]> code.delx.au - gnu-emacs/blobdiff - src/doprnt.c
* Makefile.in (doxemacs, dotemacs): Explicitly pass along the CC
[gnu-emacs] / src / doprnt.c
index 731afe400cc4054e9d5fbc3bac996600c10398d5..025845545772a4f89a6ca8387bb877365984828c 100644 (file)
@@ -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 != ' ')