15 lines
272 B
Text
15 lines
272 B
Text
|
buffer overflow
|
||
|
|
||
|
Index: gcl.c
|
||
|
--- gcl.c.orig
|
||
|
+++ gcl.c
|
||
|
@@ -925,7 +925,7 @@ static int lexanal(void) {
|
||
|
|
||
|
if (env && *env) {
|
||
|
strncpy(lexbuffer, env, LBSIZE-1);
|
||
|
- lexbuffer[LBSIZE] = '\0';
|
||
|
+ lexbuffer[LBSIZE-1] = '\0';
|
||
|
}
|
||
|
else
|
||
|
lexbuffer[0] = '\0';
|