Skip to content

Commit a98838e

Browse files
committed
Handle illegal bytes properly when converting to '7bit' encoding
Previously, mbstring would silently drop illegal bytes when converting a string to '7bit' encoding.
1 parent 4aa7430 commit a98838e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/mbstring/libmbfl/filters/mbfilter_7bit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ int mbfl_filt_conv_any_7bit(int c, mbfl_convert_filter *filter)
8383
{
8484
if (c >= 0 && c < 0x80) {
8585
CK((*filter->output_function)(c, filter->data));
86+
} else {
87+
mbfl_filt_conv_illegal_output(c, filter);
8688
}
8789
return c;
8890
}

0 commit comments

Comments
 (0)