Skip to content

Commit 17d4e66

Browse files
committed
Fix #68690: Hypothetical off-by-one condition
We fix this, even though `filter->cache == jisx0213_u2_tbl_len` can never be true here.
1 parent fa3b8c7 commit 17d4e66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ mbfl_filt_conv_wchar_jis2004(int c, mbfl_convert_filter *filter) {
508508

509509
/* check for 2nd char of combining characters */
510510
if ((filter->status & 0xf) == 1 &&
511-
filter->cache >= 0 && filter->cache <= jisx0213_u2_tbl_len) {
511+
filter->cache >= 0 && filter->cache < jisx0213_u2_tbl_len) {
512512
k = filter->cache;
513513
filter->status &= ~0xf;
514514
filter->cache = 0;

0 commit comments

Comments
 (0)