Module Name: src Committed By: christos Date: Wed Nov 27 20:48:28 UTC 2013
Modified Files: src/usr.sbin/syslogd: syslogd.c Log Message: CID 1132759: Abort on dehumanize_number error on constant built-in string. To generate a diff of this commit: cvs rdiff -u -r1.118 -r1.119 src/usr.sbin/syslogd/syslogd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/syslogd/syslogd.c diff -u src/usr.sbin/syslogd/syslogd.c:1.118 src/usr.sbin/syslogd/syslogd.c:1.119 --- src/usr.sbin/syslogd/syslogd.c:1.118 Mon Nov 11 11:39:21 2013 +++ src/usr.sbin/syslogd/syslogd.c Wed Nov 27 15:48:28 2013 @@ -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, 19 #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 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