diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-08-11 00:42:28 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-08-11 00:42:28 +0000 |
commit | ac50fa643ff13722975da16585059b0cd94fe2fe (patch) | |
tree | 579306d5b377477e4c0c753c98f990750275bea4 /src/doprnt.c | |
parent | 8d2b0b270090c85dd11363ec790dfddbbc938e41 (diff) | |
download | emacs-ac50fa643ff13722975da16585059b0cd94fe2fe.tar.gz |
(doprnt): Error if %-width is too big.
Diffstat (limited to 'src/doprnt.c')
-rw-r--r-- | src/doprnt.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/doprnt.c b/src/doprnt.c index 63f724cf7a7..6db0eda1514 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -104,10 +104,8 @@ doprnt (buffer, bufsize, format, format_end, nargs, args) size_bound = -size_bound; size_bound += 50; - if (size_bound > bufsize) - /* This is certainly enough that it doesn't matter - to lose the rest. */ - size_bound = bufsize + 100; + if (size_bound > (unsigned) (1 << (INTBITS - 1))) + error ("Format padding to large"); /* Make sure we have that much. */ if (size_bound > size_allocated) |