tony2001                Wed Sep 27 08:32:24 2006 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/standard       metaphone.c 
    /php-src    NEWS 
  Log:
  MFH: fix #38961 (metaphone() results in segmentation fault on NetBSD)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/metaphone.c?r1=1.28.2.1.2.2&r2=1.28.2.1.2.3&diff_format=u
Index: php-src/ext/standard/metaphone.c
diff -u php-src/ext/standard/metaphone.c:1.28.2.1.2.2 
php-src/ext/standard/metaphone.c:1.28.2.1.2.3
--- php-src/ext/standard/metaphone.c:1.28.2.1.2.2       Tue Sep 26 15:40:45 2006
+++ php-src/ext/standard/metaphone.c    Wed Sep 27 08:32:24 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: metaphone.c,v 1.28.2.1.2.2 2006/09/26 15:40:45 iliaa Exp $ */
+/* $Id: metaphone.c,v 1.28.2.1.2.3 2006/09/27 08:32:24 tony2001 Exp $ */
 
 /*
        Based on CPANs "Text-Metaphone-1.96" by Michael G Schwern <[EMAIL 
PROTECTED]> 
@@ -25,7 +25,7 @@
 #include "php.h"
 #include "php_metaphone.h"
 
-static int metaphone(char *word, int word_len, long max_phonemes, char 
**phoned_word, int traditional);
+static int metaphone(unsigned char *word, int word_len, long max_phonemes, 
char **phoned_word, int traditional);
 
 /* {{{ proto string metaphone(string text[, int phones])
    Break english phrases down into their phonemes */
@@ -41,7 +41,7 @@
                return;
        }
 
-       if (metaphone(str, str_len, phones, &result, 1) == 0) {
+       if (metaphone((unsigned char *)str, str_len, phones, &result, 1) == 0) {
                RETVAL_STRING(result, 0);
        } else {
                if (result) {
@@ -159,7 +159,7 @@
 
 /* {{{ metaphone
  */
-static int metaphone(char *word, int word_len, long max_phonemes, char 
**phoned_word, int traditional)
+static int metaphone(unsigned char *word, int word_len, long max_phonemes, 
char **phoned_word, int traditional)
 {
        int w_idx = 0;                          /* point in the phonization 
we're at. */
        int p_idx = 0;                          /* end of the phoned phrase */
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.266&r2=1.2027.2.547.2.267&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.266 php-src/NEWS:1.2027.2.547.2.267
--- php-src/NEWS:1.2027.2.547.2.266     Tue Sep 26 10:30:50 2006
+++ php-src/NEWS        Wed Sep 27 08:32:24 2006
@@ -6,6 +6,8 @@
 - Fixed mess with CGI/CLI -d option (now it works with cgi; constants are
   working exactly like in php.ini; with FastCGI -d affects all requests).
   (Dmitry)
+- Fixed bug #38961 (metaphone() results in segmentation fault on NetBSD). 
+  (Tony)
 - Fixed bug #38942 (Double old-style-ctor inheritance). (Dmitry)
 - Fixed bug #38941 (imap extension does not compile against new version of
   the imap library). (Ilia)

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

Reply via email to