felipe          Wed Feb 27 01:25:40 2008 UTC

  Modified files:              
    /php-src/ext/standard       metaphone.c 
  Log:
  MFB: Improved fix for #44242
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/metaphone.c?r1=1.37&r2=1.38&diff_format=u
Index: php-src/ext/standard/metaphone.c
diff -u php-src/ext/standard/metaphone.c:1.37 
php-src/ext/standard/metaphone.c:1.38
--- php-src/ext/standard/metaphone.c:1.37       Mon Feb 25 22:56:47 2008
+++ php-src/ext/standard/metaphone.c    Wed Feb 27 01:25:40 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: metaphone.c,v 1.37 2008/02/25 22:56:47 felipe Exp $ */
+/* $Id: metaphone.c,v 1.38 2008/02/27 01:25:40 felipe Exp $ */
 
 /*
        Based on CPANs "Text-Metaphone-1.96" by Michael G Schwern <[EMAIL 
PROTECTED]> 
@@ -145,7 +145,7 @@
  * could be one though; or more too). */
 #define Phonize(c)     { \
                                                if (p_idx >= max_buffer_len) { \
-                                                       *phoned_word = 
erealloc(*phoned_word, max_buffer_len + 2); \
+                                                       *phoned_word = 
safe_erealloc(*phoned_word, 2, sizeof(char), max_buffer_len); \
                                                        max_buffer_len += 2; \
                                                } \
                                                (*phoned_word)[p_idx++] = c; \
@@ -153,7 +153,7 @@
 /* Slap a null character on the end of the phoned word */
 #define End_Phoned_Word        { \
                                                        if (p_idx == 
max_buffer_len) { \
-                                                               *phoned_word = 
erealloc(*phoned_word, max_buffer_len + 1); \
+                                                               *phoned_word = 
safe_erealloc(*phoned_word, 1, sizeof(char), max_buffer_len); \
                                                        } \
                                                        (*phoned_word)[p_idx] = 
'\0'; \
                                                }

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

Reply via email to