Opened 15 years ago

Closed 15 years ago

#2918 closed defect (fixed)

out of bound access in geoconcept.c

Reported by: Even Rouault Owned by: dgrichard
Priority: normal Milestone: 1.6.1
Component: default Version: 1.6.0
Severity: normal Keywords: geoconcept
Cc:

Description

GCC 4.4 reports the following warnings :

geoconcept.c: In function ‘_readConfigFieldSubType_GCIO’:
geoconcept.c:3522: attention : array subscript is above array bounds
geoconcept.c: In function ‘_readConfigFieldType_GCIO’:
geoconcept.c:3333: attention : array subscript is above array bounds
geoconcept.c: In function ‘ReadConfig_GCIO’:
geoconcept.c:3145: attention : array subscript is above array bounds

It looks like n[kExtraSize_GCIO-1] should be replaced by x[kExtraSize_GCIO-1]...

Attachments (1)

geoconcept.diff (1.3 KB ) - added by dgrichard 15 years ago.
patch for #2918

Download all attachments as: .zip

Change History (6)

comment:1 by dgrichard, 15 years ago

Ok, I will fixed that asap.

by dgrichard, 15 years ago

Attachment: geoconcept.diff added

patch for #2918

comment:2 by dgrichard, 15 years ago

Here it's the patch. May I commit it ?

comment:3 by Even Rouault, 15 years ago

Yes, it looks good

comment:4 by dgrichard, 15 years ago

Done : revision 16679

comment:5 by Even Rouault, 15 years ago

Milestone: 1.6.1
Resolution: fixed
Status: newclosed

I've backported it to branches/1.6 in r16680

Note: See TracTickets for help on using tickets.