From d66ca5dabb79b892cb33279899d20397aabea475 Mon Sep 17 00:00:00 2001 From: nielsdos <7771979+nielsdos@users.noreply.github.com> Date: Thu, 2 Mar 2023 14:31:15 +0100 Subject: [PATCH] Propagate error checks for mbfl_filt_conv_illegal_output() --- ext/mbstring/libmbfl/filters/mbfilter_7bit.c | 2 +- ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/mbstring/libmbfl/filters/mbfilter_7bit.c b/ext/mbstring/libmbfl/filters/mbfilter_7bit.c index a3a90c96f7a..2885ca1fbd6 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_7bit.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_7bit.c @@ -76,7 +76,7 @@ int mbfl_filt_conv_any_7bit(int c, mbfl_convert_filter *filter) if (c >= 0 && c < 0x80) { CK((*filter->output_function)(c, filter->data)); } else { - mbfl_filt_conv_illegal_output(c, filter); + CK(mbfl_filt_conv_illegal_output(c, filter)); } return 0; } diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c index d023a4940a9..cc04335fcc4 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_mobile.c @@ -462,7 +462,7 @@ int mbfilter_unicode2sjis_emoji_kddi(int c, int *s1, mbfl_convert_filter *filter /* If none of the KDDI national flag emoji matched, then we have no way * to convert the previous codepoint... */ - mbfl_filt_conv_illegal_output(c1, filter); + CK(mbfl_filt_conv_illegal_output(c1, filter)); } if (c == '#' || (c >= '0' && c <= '9')) { @@ -534,7 +534,7 @@ int mbfilter_unicode2sjis_emoji_sb(int c, int *s1, mbfl_convert_filter *filter) /* If none of the SoftBank national flag emoji matched, then we have no way * to convert the previous codepoint... */ - mbfl_filt_conv_illegal_output(c1, filter); + CK(mbfl_filt_conv_illegal_output(c1, filter)); } if (c == '#' || (c >= '0' && c <= '9')) { @@ -855,7 +855,7 @@ int mbfl_filt_conv_sjis_mobile_flush(mbfl_convert_filter *filter) } else if (filter->status == 2) { /* First of a pair of Regional Indicator codepoints came at the end of a string */ filter->cache = filter->status = 0; - mbfl_filt_conv_illegal_output(c1, filter); + CK(mbfl_filt_conv_illegal_output(c1, filter)); } if (filter->flush_function) {