Fixed possible crashbug.

This commit is contained in:
Stefan Esser 2003-11-03 11:46:33 +00:00
parent 22872bb8fa
commit b763dd42c3

View file

@ -139,7 +139,7 @@ static void normalize_protected_variable(char *varname TSRMLS_DC)
/* and remove it */
if (s != varname) {
memcpy(varname, s, strlen(s)+1);
memmove(varname, s, strlen(s)+1);
}
for (p=varname; *p && *p != '['; p++) {
@ -170,7 +170,7 @@ static void normalize_protected_variable(char *varname TSRMLS_DC)
indexend = indexend ? indexend + 1 : index + strlen(index);
if (s != index) {
memcpy(s, index, strlen(s)+1);
memmove(s, index, strlen(index)+1);
s += indexend-index;
} else {
s = indexend;