New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve robustness of function LoadDataFromFile #1207

Merged
merged 1 commit into from Nov 10, 2017

Conversation

Projects
None yet
2 participants
@stweil
Contributor

stweil commented Nov 10, 2017

ftell returns a long value which can be negative when an error occurred.
It returns LONG_MAX for directories.

Both cases were not handled by the old code.

Signed-off-by: Stefan Weil sw@weilnetz.de

Improve robustness of function LoadDataFromFile
ftell returns a long value which can be negative when an error occurred.
It returns LONG_MAX for directories.

Both cases were not handled by the old code.

Signed-off-by: Stefan Weil <sw@weilnetz.de>

@zdenop zdenop merged commit ebbfc3a into tesseract-ocr:master Nov 10, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@stweil stweil deleted the stweil:robustness branch Nov 10, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment