From: Ilia Alshanetsky Date: Fri, 14 Nov 2003 00:32:25 +0000 (+0000) Subject: Fixed bug #26235 (yp_first/yp_next do not specify correct key length). X-Git-Tag: php-5.0.0b3RC1~689 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=64bc9176e10dbe1ca768aca5e4202e0d02997cff;p=php Fixed bug #26235 (yp_first/yp_next do not specify correct key length). --- diff --git a/ext/yp/yp.c b/ext/yp/yp.c index f8b3e0015c..ae51934252 100644 --- a/ext/yp/yp.c +++ b/ext/yp/yp.c @@ -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); } /* }}} */