diff options
author | kevlo <kevlo@FreeBSD.org> | 2007-12-03 10:45:44 +0000 |
---|---|---|
committer | kevlo <kevlo@FreeBSD.org> | 2007-12-03 10:45:44 +0000 |
commit | 4c075c0fb6cc4bd6e4e3afcb6ca1561d066786cf (patch) | |
tree | e20b0f790cd464ffdc4fd30680448099bf970dfc /usr.sbin/zic | |
parent | 4244e6396062d127c8e4c4b9a6d0851df613d428 (diff) | |
download | FreeBSD-src-4c075c0fb6cc4bd6e4e3afcb6ca1561d066786cf.zip FreeBSD-src-4c075c0fb6cc4bd6e4e3afcb6ca1561d066786cf.tar.gz |
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
Diffstat (limited to 'usr.sbin/zic')
-rw-r--r-- | usr.sbin/zic/zic.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/zic/zic.c b/usr.sbin/zic/zic.c index 4e235b0..10d79a8 100644 --- a/usr.sbin/zic/zic.c +++ b/usr.sbin/zic/zic.c @@ -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)) |