]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #26235 (yp_first/yp_next do not specify correct key length).
authorIlia Alshanetsky <iliaa@php.net>
Fri, 14 Nov 2003 00:32:40 +0000 (00:32 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 14 Nov 2003 00:32:40 +0000 (00:32 +0000)
NEWS
ext/yp/yp.c

diff --git a/NEWS b/NEWS
index 4ce6c02d2d659393afad2dae3aeef340590821b2..a875cd12ac9f6a9a3f5ee353b77eac69d71b3da2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ PHP 4                                                                      NEWS
 ?? ??? 2003, Version 4.3.5
 - Fixed header handler in NSAPI SAPI module (header->replace was ignored,
   send_default_content_type now sends value from php.ini). (Uwe Schindler)
+- Fixed bug #26235 (yp_first/yp_next do not specify correct key length). (Ilia)
 - Fixed bug #26216 ("getimagesize(): stream does not support seeking" when
   using remote files). (Marcus)
 - Fixed bug #26201 (crash in ibase_trans() on invalid link handle). (Ilia)
index 2dc9ca3be3d340db7f23190bae751c2ad2e168b1..7f3e61013d933b7216c570bf99bcc83e3c7e4347 100644 (file)
@@ -182,7 +182,7 @@ PHP_FUNCTION(yp_first)
                RETURN_FALSE;
        }
        array_init(return_value);
-       add_assoc_stringl_ex(return_value,outkey,outkeylen,outval,outvallen,1);
+       add_assoc_stringl_ex(return_value,outkey,outkeylen+1,outval,outvallen,1);
 
        /* Deprecated */
        add_assoc_stringl(return_value,"key",outkey,outkeylen,1);
@@ -212,7 +212,7 @@ PHP_FUNCTION(yp_next)
        }
        
        array_init(return_value);
-       add_assoc_stringl_ex(return_value,outkey,outkeylen,outval,outvallen,1);
+       add_assoc_stringl_ex(return_value,outkey,outkeylen+1,outval,outvallen,1);
 }
 /* }}} */