From NetBSD:

Revision 1.10 Sat Oct 14 17:41:55 2000 UTC by bjh21
    Don't core dump with an empty format string.  Fixes PR#11218.
    Patch supplied by Launey Thomas.

Obtained from:	NetBSD
This commit is contained in:
Tim J. Robbins 2002-05-27 03:17:28 +00:00
parent f457179a13
commit 594830fbc1

View File

@ -424,7 +424,7 @@ isint2: switch(fu->bcnt) {
* If, rep count is greater than 1, no trailing whitespace
* gets output from the last iteration of the format unit.
*/
for (fu = fs->nextfu;; fu = fu->nextfu) {
for (fu = fs->nextfu; fu; fu = fu->nextfu) {
if (!fu->nextfu && fs->bcnt < blocksize &&
!(fu->flags&F_SETREP) && fu->bcnt)
fu->reps += (blocksize - fs->bcnt) / fu->bcnt;
@ -437,8 +437,6 @@ isint2: switch(fu->bcnt) {
if (p2)
pr->nospace = p2;
}
if (!fu->nextfu)
break;
}
#ifdef DEBUG
for (fu = fs->nextfu; fu; fu = fu->nextfu) {