summaryrefslogtreecommitdiff
path: root/src/doprnt.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1992-01-13 21:48:03 +0000
committerJim Blandy <jimb@redhat.com>1992-01-13 21:48:03 +0000
commitd427b66a664c0e1ffc818dfa5b87b45b4857d2ae (patch)
treea3255be5cf521ab9c44b9fdfd06a0466274be421 /src/doprnt.c
parentb2c9579f172da05112f29b664de6d8da98c1e813 (diff)
downloademacs-d427b66a664c0e1ffc818dfa5b87b45b4857d2ae.tar.gz
entered into RCS
Diffstat (limited to 'src/doprnt.c')
-rw-r--r--src/doprnt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doprnt.c b/src/doprnt.c
index 731afe400cc..02584554577 100644
--- a/src/doprnt.c
+++ b/src/doprnt.c
@@ -68,10 +68,10 @@ doprnt (buffer, bufsize, format, format_end, nargs, args)
int size_bound;
fmt++;
- /* Copy this one %-spec into fmtcopy. */
+ /* Copy this one %-spec into fmtcpy. */
string = fmtcpy;
*string++ = '%';
- while (1)
+ while (string < fmtcpy + sizeof fmtcpy - 1)
{
*string++ = *fmt;
if (! (*fmt >= '0' && *fmt <= '9') && *fmt != '-' && *fmt != ' ')