diff options
author | brian <brian@FreeBSD.org> | 2001-08-20 12:56:45 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2001-08-20 12:56:45 +0000 |
commit | 016b1a255a4619a8b85d12e8ef931c0dfa1e13ae (patch) | |
tree | b8663d7f77ab3499896e68cc38771d771c5b2f6f /sbin/newfs | |
parent | 110fc843a0e59e68be1a9d8d1a4bb0bcb152872b (diff) | |
download | FreeBSD-src-016b1a255a4619a8b85d12e8ef931c0dfa1e13ae.zip FreeBSD-src-016b1a255a4619a8b85d12e8ef931c0dfa1e13ae.tar.gz |
Handle snprintf() returning -1.
MFC after: 2 weeks
Diffstat (limited to 'sbin/newfs')
-rw-r--r-- | sbin/newfs/mkfs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index 19049ee..84f0d9b 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -650,6 +650,8 @@ next: j = snprintf(tmpbuf, sizeof(tmpbuf), " %ld%s", fsbtodb(&sblock, cgsblock(&sblock, cylno)), cylno < (sblock.fs_ncg-1) ? "," : "" ); + if (j == -1) + j = 0; if (i + j >= width) { printf("\n"); i = 0; |