andrei          Fri Nov 17 16:45:28 2006 UTC

  Modified files:              
    /php-src/ext/standard       string.c 
  Log:
  Use u_memcpy() instead of memcpy().
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.612&r2=1.613&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.612 php-src/ext/standard/string.c:1.613
--- php-src/ext/standard/string.c:1.612 Fri Nov 17 16:44:23 2006
+++ php-src/ext/standard/string.c       Fri Nov 17 16:45:28 2006
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.612 2006/11/17 16:44:23 andrei Exp $ */
+/* $Id: string.c,v 1.613 2006/11/17 16:45:28 andrei Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -3926,7 +3926,7 @@
                                Z_USTRVAL_P(entry)[to_cp_offset - 
prev_to_offset] = 0;
 
                                key_string = eumalloc(from_cp_offset - 
prev_from_offset + 1);
-                               memcpy(key_string, str_from + prev_from_offset, 
UBYTES(from_cp_offset - prev_from_offset));
+                               u_memcpy(key_string, str_from + 
prev_from_offset, from_cp_offset - prev_from_offset);
                                key_string[from_cp_offset - prev_from_offset] = 
0;
 
                                zend_u_hash_add(tmp_hash, IS_UNICODE, 
ZSTR(key_string), from_cp_offset - prev_from_offset + 1, &entry, sizeof(zval*), 
NULL);
@@ -4020,7 +4020,7 @@
                }
 
                found = 0;
-               memcpy(key, str+pos, UBYTES(maxlen));
+               u_memcpy(key, str+pos, maxlen);
 
                for (len = maxlen; len >= minlen; len--) {
                        key[len] = 0;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to