diff options
| author | Richard M. Stallman | 1995-08-11 00:42:28 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-08-11 00:42:28 +0000 |
| commit | dfb824e8d4b54bfb913a8c4c2080d8a2dec1dbcb (patch) | |
| tree | ee3c62d9e94edb8eef7e7e98bf2eee1455afbf6a /src | |
| parent | 1077bc046b7176b1db066cf4f904d23614ddcbf1 (diff) | |
| download | emacs-dfb824e8d4b54bfb913a8c4c2080d8a2dec1dbcb.tar.gz emacs-dfb824e8d4b54bfb913a8c4c2080d8a2dec1dbcb.zip | |
(doprnt): Error if %-width is too big.
Diffstat (limited to 'src')
| -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) | |||
| 104 | size_bound = -size_bound; | 104 | size_bound = -size_bound; |
| 105 | size_bound += 50; | 105 | size_bound += 50; |
| 106 | 106 | ||
| 107 | if (size_bound > bufsize) | 107 | if (size_bound > (unsigned) (1 << (INTBITS - 1))) |
| 108 | /* This is certainly enough that it doesn't matter | 108 | error ("Format padding to large"); |
| 109 | to lose the rest. */ | ||
| 110 | size_bound = bufsize + 100; | ||
| 111 | 109 | ||
| 112 | /* Make sure we have that much. */ | 110 | /* Make sure we have that much. */ |
| 113 | if (size_bound > size_allocated) | 111 | if (size_bound > size_allocated) |