Ticket #2918 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

out of bound access in geoconcept.c

Reported by: 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

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

Change History

Changed 4 years ago by dgrichard

Ok, I will fixed that asap.

Changed 4 years ago by dgrichard

patch for #2918

Changed 4 years ago by dgrichard

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

Changed 4 years ago by rouault

Yes, it looks good

Changed 4 years ago by dgrichard

Done : revision 16679

Changed 4 years ago by rouault

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to 1.6.1

I've backported it to branches/1.6 in r16680

Note: See TracTickets for help on using tickets.