Commit 34f6af35 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Detect EOF when trying to parse a string in hp2ps

parent c5b76e6f
......@@ -416,7 +416,10 @@ GetString(infp)
i = 0;
while (ch != '\"') {
if (i == stringbuffersize - 1) {
if (ch == EOF) {
Error("%s, line %d: EOF when expecting \"", hpfile, linenum, ch);
}
else if (i == stringbuffersize - 1) {
stringbuffersize = 2 * stringbuffersize;
stringbuffer = xrealloc(stringbuffer, stringbuffersize);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment