Commit 752fb61c authored by Richard P. Curnow's avatar Richard P. Curnow

Fix off=by-one error in out_of_mem (reported by John Hein)

parent 9419d12d
......@@ -351,13 +351,13 @@ void out_of_mem(char *file, int line, size_t size)/*{{{*/
p = file;
while (*p) p++;
filelen = p - file;
write(2, msg1, sizeof(msg1));
write(2, msg1, sizeof(msg1)-1);
write(2, file, filelen);
write(2, ":", 1);
write(2, ", ", 2);
write(2, msg2, sizeof(msg2));
write(2, msg2, sizeof(msg2)-1);
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