AiPacino / tesseract-ocr

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

[PATCH] Fixed potential usage of uninitialized bool variable in textord/tospace.cpp #1106

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Please review the attached patch. It fixes a potential usage of an 
uninitialized bool variable ('fuzzy_sp'). The fix simply initialized the 
variable by default to 'FALSE'. Before the fix, the value of 'fuzzy_sp' was not 
set, but used in the else-branch in line 1107:

          else {
            prev_blanks = blanks;
            prev_fuzzy_sp = fuzzy_sp;
            prev_fuzzy_non = fuzzy_non;
          }

Best regards and many thanks

Martin Ettl

Original issue reported on code.google.com by ettl.mar...@gmail.com on 11 Feb 2014 at 1:31

Attachments:

GoogleCodeExporter commented 9 years ago
The updated patch fixes two more uninitialized variable usages in the same 
function.

Many thanks for reviewing.

Original comment by ettl.mar...@gmail.com on 11 Feb 2014 at 1:44

Attachments: