mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +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 */
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue