php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #75867
Patch php_iconv_string-out-pointer-initialize revision 2018-01-24 03:15 UTC by philipp at redfish-solutions dot com
Patch fix-initialization.patch revision 2018-01-24 02:51 UTC by mike at flyn dot org

Patch php_iconv_string-out-pointer-initialize for ICONV related Bug #75867

Patch version 2018-01-24 03:15 UTC

Return to Bug #75867 | Download this patch
Patch Revisions:

Developer: philipp@redfish-solutions.com

diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 35dafd4..4289242 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -559,6 +559,8 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
 	size_t result;
 	zend_string *ret, *out_buffer;
 
+	*out = NULL;
+
 	/*
 	  This is not the right way to get output size...
 	  This is not space efficient for large text.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 19:01:29 2024 UTC