MapServer / MapServer-import

3 stars 2 forks source link

Use of uninitialised value in msCopySymbol() #2194

Closed tbonfort closed 12 years ago

tbonfort commented 12 years ago

Reporter: dmorissette Date: 2007/08/02 - 17:44 Running valgrind on the 'testcopy' program (compile it using make testcopy) reported:

==22437== Use of uninitialised value of size 8
==22437==    at 0x808396F: msCopySymbol (mapsymbol.c:950)
==22437==    by 0x8083CC8: msCopySymbolSet (mapsymbol.c:1013)
==22437==    by 0x807279C: msCopyMap (mapcopy.c:888)
==22437==    by 0x804CB92: main (testcopy.c:59)
tbonfort commented 12 years ago

Author: dmorissette Date: 2007/08/02 - 17:47 This was caused by the loop that copies points[] in msCopySymbol() that should copy only src->numpoints points instead of attempting to copy MS_MAXVECTORPOINTS points.

The same issue was present in the loop that copies symbol patterns in the same fuction.

Fixed in de47e3651e0cf7411d51014e27bf77647a24e1a7 (r6442).