ape: fix buffer overflow in _envsetup()
This commit is contained in:
parent
50c9769bbd
commit
45b498c027
1 changed files with 2 additions and 0 deletions
|
@ -59,6 +59,8 @@ _envsetup(void)
|
||||||
for(j=0; j<nd; j++){
|
for(j=0; j<nd; j++){
|
||||||
d9 = &d9a[j];
|
d9 = &d9a[j];
|
||||||
n = strlen(d9->name);
|
n = strlen(d9->name);
|
||||||
|
if(n >= sizeof(name)-4)
|
||||||
|
continue;
|
||||||
m = d9->length;
|
m = d9->length;
|
||||||
i = p - ps;
|
i = p - ps;
|
||||||
if(i+n+1+m+1 > psize) {
|
if(i+n+1+m+1 > psize) {
|
||||||
|
|
Loading…
Reference in a new issue