mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-18 22:43:45 +08:00
Fixed a memory corruption, detected by Coverity
CID 1385632 Out-of-bounds write in DO-While loop Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
This commit is contained in:
parent
36d6cb3a46
commit
21e25d1829
@ -639,7 +639,7 @@ void UNICHARSET::unichar_insert(const char* const unichar_repr,
|
||||
}
|
||||
int index = 0;
|
||||
do {
|
||||
if (index > UNICHAR_LEN) {
|
||||
if (index >= UNICHAR_LEN) {
|
||||
fprintf(stderr, "Utf8 buffer too big, size>%d for %s\n", UNICHAR_LEN,
|
||||
unichar_repr);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user