# HG changeset patch # User Richard M. Stallman # Date 808101748 0 # Node ID cc26e7c955cc2d85da88b6eb42b84332d0c41cf7 # Parent f36fccc38b0d4c918eb0c56c7b490933672fa918 (doprnt): Error if %-width is too big. diff -r f36fccc38b0d -r cc26e7c955cc src/doprnt.c --- 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)