tesseract/ccutil
Stefan Weil fb863c97a9 UNICHARSET: Add missing initialization
The member variable default_sid_ was used without being initialized.

Valgrind report for `tesseract --oem 1 hello.png hello`:

    Conditional jump or move depends on uninitialised value(s)
       at 0x14352E: BITS16::set_bit(unsigned char, unsigned char) (bits16.h:50)
       by 0x143E27: WERD::set_flag(WERD_FLAGS, unsigned char) (werd.h:129)
       by 0x27D053: WERD_RES::SetupWordScript(UNICHARSET const&) (pageres.cpp:381)
       by 0x27CAFD: WERD_RES::SetupForRecognition(UNICHARSET const&, tesseract::Tesseract*, Pix*, int, TBOX const*, bool, bool, bool, ROW*, BLOCK const*) (pageres.cpp:316)
       by 0x145903: tesseract::Tesseract::SetupWordPassN(int, tesseract::WordData*) (control.cpp:182)
       by 0x145780: tesseract::Tesseract::SetupAllWordsPassN(int, TBOX const*, char const*, PAGE_RES*, GenericVector<tesseract::WordData>*) (control.cpp:168)
       by 0x146293: tesseract::Tesseract::recog_all_words(PAGE_RES*, ETEXT_DESC*, TBOX const*, char const*, int) (control.cpp:336)
       by 0x12F356: tesseract::TessBaseAPI::Recognize(ETEXT_DESC*) (baseapi.cpp:878)
       by 0x13036D: tesseract::TessBaseAPI::ProcessPage(Pix*, int, char const*, char const*, int, tesseract::TessResultRenderer*) (baseapi.cpp:1184)
       by 0x13014A: tesseract::TessBaseAPI::ProcessPagesInternal(char const*, char const*, int, tesseract::TessResultRenderer*) (baseapi.cpp:1140)
       by 0x12FBCE: tesseract::TessBaseAPI::ProcessPages(char const*, char const*, int, tesseract::TessResultRenderer*) (baseapi.cpp:1040)
       by 0x12C3DF: main (tesseractmain.cpp:515)
     Uninitialised value was created by a heap allocation
       at 0x4C2C21F: operator new(unsigned long) (vg_replace_malloc.c:334)
       by 0x12D88B: tesseract::TessBaseAPI::Init(char const*, int, char const*, tesseract::OcrEngineMode, char**, int, GenericVector<STRING> const*, GenericVector<STRING> const*, bool, bool (*)(STRING const&, GenericVector<char>*)) (baseapi.cpp:320)
       by 0x12D6DA: tesseract::TessBaseAPI::Init(char const*, char const*, tesseract::OcrEngineMode, char**, int, GenericVector<STRING> const*, GenericVector<STRING> const*, bool) (baseapi.cpp:284)
       by 0x12C088: main (tesseractmain.cpp:440)

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-19 20:57:39 +02:00
..
ambigs.cpp Fix Cygwin compatibility 2016-06-17 15:52:01 +03:00
ambigs.h Reviewed uses of reinterpret_cast 2017-05-11 01:58:40 +02:00
basedir.cpp remove unused code (Windows related) 2013-07-08 18:21:10 +00:00
basedir.h Fixed relative-to-executable tessdata location, while allowing for addition of terminating / 2012-10-09 00:41:08 +00:00
bits16.cpp remove unused code (Windows related) 2013-07-08 18:21:10 +00:00
bits16.h Remove extra semicolons after member function definitions 2016-12-04 14:54:52 +01:00
bitvector.cpp Fixed a lot of compiler/clang warnings 2014-01-25 02:28:51 +00:00
bitvector.h clang-tidy changes from sync 2017-01-25 16:20:19 -08:00
ccutil.cpp Added missing license headers 2016-11-18 15:53:11 -08:00
ccutil.h ccutil: Remove unneeded include statement 2017-05-12 14:11:21 +02:00
clst.cpp Result of clang tidy on recent merge 2016-11-07 10:46:33 -08:00
clst.h Result of clang tidy on recent merge 2016-11-07 10:46:33 -08:00
doubleptr.h Major refactor of beam search, elimination of dead code, misc bug fixes, updates to Makefile.am, Changelog etc. 2013-09-23 15:26:50 +00:00
elst2.cpp Result of clang tidy on recent merge 2016-11-07 10:46:33 -08:00
elst2.h Result of clang tidy on recent merge 2016-11-07 10:46:33 -08:00
elst.cpp Result of clang tidy on recent merge 2016-11-07 10:46:33 -08:00
elst.h Result of clang tidy on recent merge 2016-11-07 10:46:33 -08:00
errcode.cpp remove unused code (Windows related) 2013-07-08 18:21:10 +00:00
errcode.h Result of clang tidy on recent merge 2016-11-07 10:46:33 -08:00
fileerr.h top-skimming import from sf.net 2007-03-07 20:03:40 +00:00
genericheap.h Fix #define guards in header files 2016-12-04 15:43:03 +01:00
genericvector.h Remove unneeded null pointer check 2017-05-16 22:58:10 +02:00
globaloc.cpp Turned on pdfrenderer functionality that needs leptonica 1.70 2014-01-23 23:01:10 +00:00
globaloc.h Major refactor of beam search, elimination of dead code, misc bug fixes, updates to Makefile.am, Changelog etc. 2013-09-23 15:26:50 +00:00
helpers.h Reviewed uses of reinterpret_cast 2017-05-11 01:58:40 +02:00
host.h Remove obsolete comments and unused code from ccutil/host.h 2017-05-17 11:55:00 +02:00
indexmapbidi.cpp Remaining misc changes for 3.02 2012-02-02 03:14:43 +00:00
indexmapbidi.h Remaining misc changes for 3.02 2012-02-02 03:14:43 +00:00
kdpair.h Major refactor of beam search, elimination of dead code, misc bug fixes, updates to Makefile.am, Changelog etc. 2013-09-23 15:26:50 +00:00
lsterr.h clang-tidy changes from sync 2017-01-25 16:20:19 -08:00
mainblk.cpp Added extra Init that takes a memory buffer or a filereader function pointer to enable read of traineddata from memory or foreign file systems. Updated existing readers to use TFile API instead of FILE. This does not yet add big-endian capability to LSTM, but it is very easy from here. 2017-04-27 15:48:23 -07:00
Makefile.am Remove code that is no longer needed 2017-01-16 01:49:17 +02:00
memry.cpp Replace alloc_struct, free_struct 2017-04-30 09:25:04 +02:00
memry.h Replace alloc_struct, free_struct 2017-04-30 09:25:04 +02:00
ndminx.h Harmless improvements from 3.00 going in to 2.04 2008-12-30 18:20:15 +00:00
nwmain.h remove unused code (Windows related) 2013-07-08 18:21:10 +00:00
object_cache.h Major refactor of beam search, elimination of dead code, misc bug fixes, updates to Makefile.am, Changelog etc. 2013-09-23 15:26:50 +00:00
ocrclass.h Fix windows build. 2016-11-24 17:32:23 +03:00
params.cpp Fix wrong format string 2017-05-11 09:06:02 +02:00
params.h Added extra Init that takes a memory buffer or a filereader function pointer to enable read of traineddata from memory or foreign file systems. Updated existing readers to use TFile API instead of FILE. This does not yet add big-endian capability to LSTM, but it is very easy from here. 2017-04-27 15:48:23 -07:00
platform.h Fix possible warning when WIN32_LEAN_AND_MEAN is already defined. 2017-01-24 00:22:36 +03:00
qrsequence.h 3.01 code from http://github.com/jimregan/tesseract-ocr with addaptions related to Linux and Windows (VC2008) compile process 2010-11-23 18:34:14 +00:00
scanutils.cpp More formatting fixes from clang tidy 2017-04-28 13:38:32 -07:00
scanutils.h Applied patch to refix issue 331 2014-04-23 23:12:53 +00:00
serialis.cpp Optimize code by replacing init_to_size with resize_no_init 2017-05-12 14:34:55 +02:00
serialis.h Final part of endian improvement. Adds big-endian support to lstm and fixes issue 518 2017-05-03 16:09:44 -07:00
sorthelper.h Reviewed uses of reinterpret_cast 2017-05-11 01:58:40 +02:00
stderr.h top-skimming import from sf.net 2007-03-07 20:03:40 +00:00
strngs.cpp Final part of endian improvement. Adds big-endian support to lstm and fixes issue 518 2017-05-03 16:09:44 -07:00
strngs.h Fewer g++ -Wsign-compare warnings 2017-05-11 23:14:52 +02:00
tesscallback.h clang-tidy changes from sync 2017-01-25 16:20:19 -08:00
tessdatamanager.cpp Improve robustness of TessdataManager 2017-05-14 21:33:56 +02:00
tessdatamanager.h Remove unused method TessdataManager::LoadFileLater 2017-05-13 13:14:47 +02:00
tprintf.cpp Moved -v to training 2014-01-09 17:25:12 +00:00
tprintf.h Moved -v to training 2014-01-09 17:25:12 +00:00
unichar.cpp Improved newlines and spaces in a box file so it works better with RTL languages. 2015-05-12 17:51:03 -07:00
unichar.h Fix typo 2017-04-15 17:27:56 +02:00
unicharcompress.cpp Final part of endian improvement. Adds big-endian support to lstm and fixes issue 518 2017-05-03 16:09:44 -07:00
unicharcompress.h Final part of endian improvement. Adds big-endian support to lstm and fixes issue 518 2017-05-03 16:09:44 -07:00
unicharmap.cpp Fixed issue 736 2012-09-21 15:19:44 +00:00
unicharmap.h Replace reserved identifiers used in #define guards header files 2016-12-04 15:43:03 +01:00
unicharset.cpp Clean method UNICHARSET::add_script 2017-05-13 11:53:43 +02:00
unicharset.h UNICHARSET: Add missing initialization 2017-05-19 20:57:39 +02:00
unicity_table.h Final part of endian improvement. Adds big-endian support to lstm and fixes issue 518 2017-05-03 16:09:44 -07:00
unicodes.cpp Remaining misc changes for 3.02 2012-02-02 03:14:43 +00:00
unicodes.h Replace reserved identifiers used in #define guards header files 2016-12-04 15:43:03 +01:00
universalambigs.cpp Misc fixes, mostly clang formatting, but some bug fixes in matrix, werd, and tesstrain_utils. Also updates unicharset to match traineddata files. 2015-07-09 14:28:20 -07:00
universalambigs.h clang-tidy changes from sync 2017-01-25 16:20:19 -08:00