]> granicus.if.org Git - php/commitdiff
Fixed possible crashbug.
authorStefan Esser <sesser@php.net>
Mon, 3 Nov 2003 11:46:33 +0000 (11:46 +0000)
committerStefan Esser <sesser@php.net>
Mon, 3 Nov 2003 11:46:33 +0000 (11:46 +0000)
main/rfc1867.c

index 3c1a21c82e10a31cad1ef830c608f2f97769646b..e67973d15d2851cf1bb65c2a24f23d96e579dffc 100644 (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;