From 7d60c49e0eead872f45861af7b935a54c3209037 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 14 Nov 2003 00:32:40 +0000 Subject: [PATCH] MFH: Fixed bug #26235 (yp_first/yp_next do not specify correct key length). --- NEWS | 1 + ext/yp/yp.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 4ce6c02d2d..a875cd12ac 100644 --- 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) diff --git a/ext/yp/yp.c b/ext/yp/yp.c index 2dc9ca3be3..7f3e61013d 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); } /* }}} */ -- 2.40.0