zic(8) should exit the loop when the end of the string is reached due

to the call to error(). The problem found by doing fuzz testing.

MFC after: 3 days
This commit is contained in:
Kevin Lo 2007-12-03 10:45:44 +00:00
parent 3ab065b6e3
commit e8f7de4bed
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174210

View File

@ -1990,7 +1990,10 @@ register char * cp;
else while ((*dp = *cp++) != '"')
if (*dp != '\0')
++dp;
else error(_("odd number of quotation marks"));
else {
error(_("odd number of quotation marks"));
exit(EXIT_FAILURE);
}
} while (*cp != '\0' && *cp != '#' &&
(!isascii(*cp) || !isspace((unsigned char) *cp)));
if (isascii(*cp) && isspace((unsigned char) *cp))