diff options
| author | christos <christos@NetBSD.org> | 2013-11-27 20:48:28 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2013-11-27 20:48:28 +0000 |
| commit | 3e44bd725a514394e459deebce5f86bb192d19a4 (patch) | |
| tree | ed9d6a0e1ea3aada5e38eda4dde1183c78857b44 /usr.sbin/syslogd | |
| parent | 65d4c0ad0c8e383a81ff6dbf9d9f5f02ce10af0a (diff) | |
CID 1132759: Abort on dehumanize_number error on constant built-in string.
Diffstat (limited to 'usr.sbin/syslogd')
| -rw-r--r-- | usr.sbin/syslogd/syslogd.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 841a9346c21..86b9e835100 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1,4 +1,4 @@ -/* $NetBSD: syslogd.c,v 1.118 2013/11/11 16:39:21 christos Exp $ */ +/* $NetBSD: syslogd.c,v 1.119 2013/11/27 20:48:28 christos Exp $ */ /* * Copyright (c) 1983, 1988, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1988, 1993, 1994\ #if 0 static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #else -__RCSID("$NetBSD: syslogd.c,v 1.118 2013/11/11 16:39:21 christos Exp $"); +__RCSID("$NetBSD: syslogd.c,v 1.119 2013/11/27 20:48:28 christos Exp $"); #endif #endif /* not lint */ @@ -3207,13 +3207,15 @@ read_config_file(FILE *cf, struct filed **f_ptr) if (!TypeInfo[i].queue_length_string || dehumanize_number(TypeInfo[i].queue_length_string, &TypeInfo[i].queue_length) == -1) - dehumanize_number(TypeInfo[i].default_length_string, - &TypeInfo[i].queue_length); + if (dehumanize_number(TypeInfo[i].default_length_string, + &TypeInfo[i].queue_length) == -1) + abort(); if (!TypeInfo[i].queue_size_string || dehumanize_number(TypeInfo[i].queue_size_string, &TypeInfo[i].queue_size) == -1) - dehumanize_number(TypeInfo[i].default_size_string, - &TypeInfo[i].queue_size); + if (dehumanize_number(TypeInfo[i].default_size_string, + &TypeInfo[i].queue_size) == -1) + abort(); } #ifndef DISABLE_SIGN |
