mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
Fixed possible crashbug.
This commit is contained in:
parent
22872bb8fa
commit
b763dd42c3
1 changed files with 2 additions and 2 deletions
|
@ -139,7 +139,7 @@ static void normalize_protected_variable(char *varname TSRMLS_DC)
|
||||||
|
|
||||||
/* and remove it */
|
/* and remove it */
|
||||||
if (s != varname) {
|
if (s != varname) {
|
||||||
memcpy(varname, s, strlen(s)+1);
|
memmove(varname, s, strlen(s)+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (p=varname; *p && *p != '['; p++) {
|
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);
|
indexend = indexend ? indexend + 1 : index + strlen(index);
|
||||||
|
|
||||||
if (s != index) {
|
if (s != index) {
|
||||||
memcpy(s, index, strlen(s)+1);
|
memmove(s, index, strlen(index)+1);
|
||||||
s += indexend-index;
|
s += indexend-index;
|
||||||
} else {
|
} else {
|
||||||
s = indexend;
|
s = indexend;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue