migscabral / tesseract-ocr

Automatically exported from code.google.com/p/tesseract-ocr
0 stars 0 forks source link

[ 1589334 ] segfault for filenames without a dot #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Roger Luethi - rluethi(sf)

In pgedit.cpp:797, strrchr() will return NULL if the
given filename is lacking a dot. but the code doesn't
check for it.

Therefore, feeding the program a filename without a dot
results in a segfault as the subsequent strcmp()
expects valid pointers.

Original issue reported on code.google.com by tmb...@gmail.com on 7 Mar 2007 at 10:25

GoogleCodeExporter commented 9 years ago

Original comment by tmb...@gmail.com on 7 Mar 2007 at 10:26

GoogleCodeExporter commented 9 years ago
It uses the extension to recognize the filetype. To fix requires a bigger change
related to all the obsolete filetypes it used to be able to read. This is not a 
high
priority right now.

Original comment by theraysm...@gmail.com on 17 May 2007 at 6:17

GoogleCodeExporter commented 9 years ago
Yes, I also encountered this segfault. A two-line fix is given in
http://www.win.tue.nl/~aeb/linux/ocr/patch6

Original comment by a...@win.tue.nl on 22 Nov 2007 at 1:01

GoogleCodeExporter commented 9 years ago
Crash fixed in 3.00. Reads the images with leptonica.

Original comment by theraysm...@gmail.com on 20 May 2010 at 6:45