From 45b498c027d1a460f79d7d545bf131a40acc40c2 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 2 Dec 2012 12:32:23 +0100 Subject: [PATCH] ape: fix buffer overflow in _envsetup() --- sys/src/ape/lib/ap/plan9/_envsetup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/src/ape/lib/ap/plan9/_envsetup.c b/sys/src/ape/lib/ap/plan9/_envsetup.c index 55cf33b85..c83d45008 100644 --- a/sys/src/ape/lib/ap/plan9/_envsetup.c +++ b/sys/src/ape/lib/ap/plan9/_envsetup.c @@ -59,6 +59,8 @@ _envsetup(void) for(j=0; jname); + if(n >= sizeof(name)-4) + continue; m = d9->length; i = p - ps; if(i+n+1+m+1 > psize) {