changeset 12830:cc26e7c955cc

(doprnt): Error if %-width is too big.
author Richard M. Stallman <rms@gnu.org>
date Fri, 11 Aug 1995 00:42:28 +0000
parents f36fccc38b0d
children 3917c5d131d3
files src/doprnt.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/doprnt.c	Fri Aug 11 00:41:00 1995 +0000
+++ b/src/doprnt.c	Fri Aug 11 00:42:28 1995 +0000
@@ -104,10 +104,8 @@
 	    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)