~ubuntu-branches/debian/sid/gdal/sid

« back to all changes in this revision

Viewing changes to frmts/gtiff/libgeotiff/geo_new.c

  • Committer: Package Import Robot
  • Author(s): Francesco Paolo Lovergine
  • Date: 2012-05-07 15:04:42 UTC
  • mfrom: (5.5.16 experimental)
  • Revision ID: package-import@ubuntu.com-20120507150442-2eks97loeh6rq005
Tags: 1.9.0-1
* Ready for sid, starting transition.
* All symfiles updated to latest builds.
* Added dh_numpy call in debian/rules to depend on numpy ABI.
* Policy bumped to 3.9.3, no changes required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
        
125
125
    /* If we got here, then the geokey can be parsed */
126
126
    count = header->hdr_num_keys;
 
127
 
 
128
    if (count * sizeof(KeyEntry) >= (4 + MAX_VALUES) * sizeof(pinfo_t)) 
 
129
        goto failure; 
 
130
 
127
131
    gt->gt_num_keys = count;
128
132
    gt->gt_version  = header->hdr_version;
129
133
    gt->gt_rev_major  = header->hdr_rev_major;
156
160
    else
157
161
    {
158
162
        /* last NULL doesn't count; "|" used for delimiter */
159
 
        --tempData.tk_asciiParamsLength;
 
163
        if( tempData.tk_asciiParamsLength > 0 
 
164
            && tempData.tk_asciiParams[tempData.tk_asciiParamsLength-1] == '\0')
 
165
        {
 
166
            --tempData.tk_asciiParamsLength;
 
167
        }
160
168
    }
161
169
 
162
170
    /* allocate space for GeoKey array and its index */