Fix buffer overrun (thanks abrugh!)

This commit is contained in:
Neale Pickett 2008-06-06 14:42:53 -06:00
parent b69bb4c0b4
commit 259ac57361
1 changed files with 4 additions and 0 deletions

View File

@ -107,6 +107,10 @@ main(int argc, char *argv[])
}
break;
}
if (obuflen == sizeof(obuf)) {
(void)write(STDOUT_FILENO, obuf, obuflen);
obuflen = 0;
}
}
}
}