diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1999-03-08 03:16:35 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1999-03-08 03:16:35 +0000 |
commit | 6bfd604944cf48ae607b7eaba2abe9d8481da592 (patch) | |
tree | 2e6733b8e813ee7d21b24b3f99b458383d1d968c /usr.bin | |
parent | db3c2c4c2a70ef19a1cd1e1a59d071a4ef85db7b (diff) |
numlogs cannot be negative; karls@inet.no
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/newsyslog/newsyslog.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/newsyslog/newsyslog.c b/usr.bin/newsyslog/newsyslog.c index 470588f2dad..40fa640f57c 100644 --- a/usr.bin/newsyslog/newsyslog.c +++ b/usr.bin/newsyslog/newsyslog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: newsyslog.c,v 1.17 1999/01/05 00:43:44 deraadt Exp $ */ +/* $OpenBSD: newsyslog.c,v 1.18 1999/03/08 03:16:34 millert Exp $ */ /* * Copyright (c) 1997, Jason Downs. All rights reserved. @@ -61,7 +61,7 @@ provided "as is" without express or implied warranty. */ #ifndef lint -static char rcsid[] = "$OpenBSD: newsyslog.c,v 1.17 1999/01/05 00:43:44 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: newsyslog.c,v 1.18 1999/03/08 03:16:34 millert Exp $"; #endif /* not lint */ #ifndef CONF @@ -361,7 +361,7 @@ struct conf_entry *parse_file() q = parse = missing_field(sob(++parse),errline); *(parse = son(parse)) = '\0'; - if (!sscanf(q,"%d",&working->numlogs)) + if (!sscanf(q,"%d",&working->numlogs) || working->numlogs < 0) errx(1, "Error in config file; bad number: %s", q); q = parse = missing_field(sob(++parse),errline); |