diff options
| -rw-r--r-- | src/doprnt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/doprnt.c b/src/doprnt.c index 7abe5fa3a6b..303846124f4 100644 --- a/src/doprnt.c +++ b/src/doprnt.c | |||
| @@ -94,11 +94,12 @@ doprnt (buffer, bufsize, format, format_end, nargs, args) | |||
| 94 | } | 94 | } |
| 95 | *string = 0; | 95 | *string = 0; |
| 96 | /* Get an idea of how much space we might need. */ | 96 | /* Get an idea of how much space we might need. */ |
| 97 | size_bound = atoi (&fmtcpy[1]) + 50; | 97 | size_bound = atoi (&fmtcpy[1]); |
| 98 | 98 | ||
| 99 | /* Avoid pitfall of negative "size" parameter ("%-200d"). */ | 99 | /* Avoid pitfall of negative "size" parameter ("%-200d"). */ |
| 100 | if (size_bound < 0) | 100 | if (size_bound < 0) |
| 101 | size_bound = -size_bound; | 101 | size_bound = -size_bound; |
| 102 | size_bound += 50; | ||
| 102 | 103 | ||
| 103 | /* Make sure we have that much. */ | 104 | /* Make sure we have that much. */ |
| 104 | if (size_bound > size_allocated) | 105 | if (size_bound > size_allocated) |