Source-Changes-HG archive

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

[src/trunk]: src/common/lib/libprop Limit size of xml buffer for userland req...



details:   https://anonhg.NetBSD.org/src/rev/7ad019eb0c96
branches:  trunk
changeset: 338127:7ad019eb0c96
user:      christos <christos%NetBSD.org@localhost>
date:      Mon May 11 16:48:34 2015 +0000

description:
Limit size of xml buffer for userland requests (From Mateusz Kocielski)
XXX: pullup-7

diffstat:

 common/lib/libprop/prop_kern.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r 7282c3b48a83 -r 7ad019eb0c96 common/lib/libprop/prop_kern.c
--- a/common/lib/libprop/prop_kern.c    Mon May 11 13:07:57 2015 +0000
+++ b/common/lib/libprop/prop_kern.c    Mon May 11 16:48:34 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: prop_kern.c,v 1.18 2014/12/14 23:48:58 chs Exp $       */
+/*     $NetBSD: prop_kern.c,v 1.19 2015/05/11 16:48:34 christos Exp $  */
 
 /*-
  * Copyright (c) 2006, 2009 The NetBSD Foundation, Inc.
@@ -407,6 +407,9 @@
        char *buf;
        int error;
 
+       if (pref->pref_len >= prop_object_copyin_limit)
+               return EINVAL;
+
        /*
         * Allocate an extra byte so we can guarantee NUL-termination.
         *



Home | Main Index | Thread Index | Old Index