diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2019-07-29 08:48:13 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-07-29 08:48:13 +0200 |
commit | 30eb4b3563f508019d306c3c62311f43d4ce6682 (patch) | |
tree | c50a68ad9a0e21ce511e61c0f5fe9313c3301f1b | |
parent | 5649267b257c78e46a934434c0bff894e0b5b694 (diff) | |
download | php-git-30eb4b3563f508019d306c3c62311f43d4ce6682.tar.gz |
Fix #78342: Bus error in configure test for iconv //IGNORE
We have to check the return value of iconv_open() for error, to avoid
that and potentially other undesired behavior of iconv().
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | ext/iconv/config.m4 | 3 |
2 files changed, 7 insertions, 0 deletions
@@ -6,6 +6,10 @@ PHP NEWS . Fixed bug #77946 (Bad cURL resources returned by curl_multi_info_read()). (Abyr Valg) +- Iconv: + . Fixed bug #78342 (Bus error in configure test for iconv //IGNORE). (Rainer + Jung) + - LiteSpeed: . Updated to LiteSpeed SAPI V7.5 (Fixed clean shutdown). (George Wang) diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 index 6a056979e7..10b4e549fd 100644 --- a/ext/iconv/config.m4 +++ b/ext/iconv/config.m4 @@ -166,6 +166,9 @@ int main() { int main() { iconv_t cd = iconv_open( "UTF-8//IGNORE", "UTF-8" ); + if(cd == (iconv_t)-1) { + return 1; + } char *in_p = "\xC3\xC3\xC3\xB8"; size_t in_left = 4, out_left = 4096; char *out = malloc(out_left); |