-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TFile: Improve handling of potential integer overflow
Raise an assertion for unexpected arguments and use size_t instead of int for the size argument which is typically sizeof(some_datatype). Signed-off-by: Stefan Weil <sw@weilnetz.de>
- Loading branch information
Showing
2 changed files
with
22 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8bea6bc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FAIL: osd_test
Running main() from gtest_main.cc
[==========] Running 14 tests from 8 test cases.
[----------] Global test environment set-up.
[----------] 3 tests from TessdataEngEuroHebrew/OSDTest
[ RUN ] TessdataEngEuroHebrew/OSDTest.MatchOrientationDegrees/0
count > 0:Error:Assert failed:in file serialis.cpp, line 115
FAIL osd_test (exit status: 139)
8bea6bc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also failing
tesseract data/train/cop.sophia-001.exp0.tif data/train/cop.sophia-001.exp0 --psm 13 lstm.train
Tesseract Open Source OCR Engine v4.0.0-beta.1-311-g83ae with Leptonica
Page 1
Warning. Invalid resolution 0 dpi. Using 70 instead.
count > 0:Error:Assert failed:in file serialis.cpp, line 163
Makefile:91: recipe for target 'data/train/cop.sophia-001.exp0.lstmf' failed
make: *** [data/train/cop.sophia-001.exp0.lstmf] Segmentation fault (core dumped)
8bea6bc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed with PR #1633 which allows count == 0.