mirror of
https://github.com/qpdf/qpdf.git
synced 2025-02-07 06:08:26 +00:00
fix memory error caught by valgrind
This commit is contained in:
parent
76b1659177
commit
0abdf5381c
@ -1778,6 +1778,7 @@ QPDFWriter::writeHintStream(int hint_id)
|
||||
|
||||
unsigned char* hs = hint_buffer->getBuffer();
|
||||
unsigned long hlen = hint_buffer->getSize();
|
||||
char last_char = hs[hlen - 1];
|
||||
|
||||
writeString("<< /Filter /FlateDecode /S ");
|
||||
writeString(QUtil::int_to_string(S));
|
||||
@ -1799,7 +1800,7 @@ QPDFWriter::writeHintStream(int hint_id)
|
||||
writeBuffer(hint_buffer);
|
||||
popPipelineStack();
|
||||
|
||||
if (hs[hlen - 1] != '\n')
|
||||
if (last_char != '\n')
|
||||
{
|
||||
writeString("\n");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user