Skip to content

Commit ae2bc62

Browse files
committed
Fix shift UB in mbfilter_utf32.c
1 parent f65046b commit ae2bc62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/mbstring/libmbfl/filters/mbfilter_utf32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ int mbfl_filt_conv_utf32_wchar(int c, mbfl_convert_filter *filter)
138138
if (endian) {
139139
n = c & 0xff;
140140
} else {
141-
n = (c & 0xff) << 24;
141+
n = (unsigned) (c & 0xff) << 24;
142142
}
143143
filter->cache = n;
144144
filter->status++;

0 commit comments

Comments
 (0)