sprhawk / leptonica

Automatically exported from code.google.com/p/leptonica
0 stars 0 forks source link

FREE() on dangling pointers in pixRowStats and pixColumnStats (1.68) #67

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have been wrestling with a segmentation violation and tracked it down 
(eventually!) to the pixRowStats and pixColumnStats functions in leptonica 
version 1.68.

If pixRowStats is called like this

   pixRowStats(pPix, &pMeanNuma, 0, 0, 0, 0, 0);

ie., with only the 'mean' argument non-null, then line 1221 of pix4.c is 
executed without favar having been initialised. The same thing happens in 
pixColumnStats.

The bug is easily fixed by initialising the fa... pointers to NULL on lines 
1169 and 1170 (and similarly for pixColumnStats).

Cheers.

Original issue reported on code.google.com by robert.d...@gmail.com on 2 Aug 2012 at 12:00

GoogleCodeExporter commented 9 years ago
Thank you for reporting the bug(s) and giving the fix.
The bug also exists in 1.69.

This will be fixed in 1.70.

Original comment by dan.bloo...@gmail.com on 3 Aug 2012 at 4:04

GoogleCodeExporter commented 9 years ago
1.70 is released.  You can get it from leptonica.org/download.html

Original comment by dan.bloo...@gmail.com on 23 Jan 2014 at 8:45