Commit dfb824e8 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(doprnt): Error if %-width is too big.

parent 1077bc04
...@@ -104,10 +104,8 @@ doprnt (buffer, bufsize, format, format_end, nargs, args) ...@@ -104,10 +104,8 @@ doprnt (buffer, bufsize, format, format_end, nargs, args)
size_bound = -size_bound; size_bound = -size_bound;
size_bound += 50; size_bound += 50;
if (size_bound > bufsize) if (size_bound > (unsigned) (1 << (INTBITS - 1)))
/* This is certainly enough that it doesn't matter error ("Format padding to large");
to lose the rest. */
size_bound = bufsize + 100;
/* Make sure we have that much. */ /* Make sure we have that much. */
if (size_bound > size_allocated) if (size_bound > size_allocated)
......
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