Module Name:    src
Committed By:   christos
Date:           Mon May 11 16:48:34 UTC 2015

Modified Files:
        src/common/lib/libprop: prop_kern.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/common/lib/libprop/prop_kern.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/common/lib/libprop/prop_kern.c
diff -u src/common/lib/libprop/prop_kern.c:1.18 src/common/lib/libprop/prop_kern.c:1.19
--- src/common/lib/libprop/prop_kern.c:1.18	Sun Dec 14 18:48:58 2014
+++ src/common/lib/libprop/prop_kern.c	Mon May 11 12:48:34 2015
@@ -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 @@ _prop_object_copyin(const struct plistre
 	char *buf;
 	int error;
 
+	if (pref->pref_len >= prop_object_copyin_limit)
+		return EINVAL;
+
 	/*
 	 * Allocate an extra byte so we can guarantee NUL-termination.
 	 *

Reply via email to