Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/ldpd CVE 1129617: negative arg



details:   https://anonhg.NetBSD.org/src/rev/62e2b3ec0f72
branches:  trunk
changeset: 791466:62e2b3ec0f72
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Nov 19 16:42:16 2013 +0000

description:
CVE 1129617: negative arg

diffstat:

 usr.sbin/ldpd/conffile.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 0ca747c94259 -r 62e2b3ec0f72 usr.sbin/ldpd/conffile.c
--- a/usr.sbin/ldpd/conffile.c  Tue Nov 19 14:04:24 2013 +0000
+++ b/usr.sbin/ldpd/conffile.c  Tue Nov 19 16:42:16 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: conffile.c,v 1.10 2013/11/13 21:22:46 christos Exp $ */
+/* $NetBSD: conffile.c,v 1.11 2013/11/19 16:42:16 christos Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -122,7 +122,8 @@
        if (confh == -1 || fstat(confh, &fs) == -1 ||
            (mapped = mmap(NULL, fs.st_size, PROT_READ, MAP_SHARED, confh, 0))
            == MAP_FAILED) {
-               close(confh);
+               if (confh != -1)
+                       close(confh);
                return E_CONF_IO;
        }
 



Home | Main Index | Thread Index | Old Index