mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-18 14:41:36 +08:00
Merge pull request #32 from orbitcowboy/master
Fix potential null pointer dereference in ccmain/paragraphs.cpp.
This commit is contained in:
commit
f8ebff262e
@ -636,7 +636,11 @@ bool TessPDFRenderer::BeginDocumentHandler() {
|
||||
" /Length1 %ld\n"
|
||||
">>\n"
|
||||
"stream\n", size, size);
|
||||
if (n >= sizeof(buf)) return false;
|
||||
if (n >= sizeof(buf))
|
||||
{
|
||||
delete[] buffer;
|
||||
return false;
|
||||
}
|
||||
AppendString(buf);
|
||||
objsize = strlen(buf);
|
||||
AppendData(buffer, size);
|
||||
|
Loading…
Reference in New Issue
Block a user