Skip to content

Commit 30eb4b3

Browse files
committed
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().
1 parent 5649267 commit 30eb4b3

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ PHP NEWS
66
. Fixed bug #77946 (Bad cURL resources returned by curl_multi_info_read()).
77
(Abyr Valg)
88

9+
- Iconv:
10+
. Fixed bug #78342 (Bus error in configure test for iconv //IGNORE). (Rainer
11+
Jung)
12+
913
- LiteSpeed:
1014
. Updated to LiteSpeed SAPI V7.5 (Fixed clean shutdown). (George Wang)
1115

ext/iconv/config.m4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ int main() {
166166
167167
int main() {
168168
iconv_t cd = iconv_open( "UTF-8//IGNORE", "UTF-8" );
169+
if(cd == (iconv_t)-1) {
170+
return 1;
171+
}
169172
char *in_p = "\xC3\xC3\xC3\xB8";
170173
size_t in_left = 4, out_left = 4096;
171174
char *out = malloc(out_left);

0 commit comments

Comments
 (0)