[PATCH] Fix buffer overrun in EUC-KR conversion module (bug 24973)
Adhemerval Zanella
adhemerval.zanella@linaro.org
Mon Sep 9 17:16:00 GMT 2019
On 09/09/2019 12:58, Andreas Schwab wrote:
> diff --git a/iconvdata/euc-kr.c b/iconvdata/euc-kr.c
> index 379414c426..167a554719 100644
> --- a/iconvdata/euc-kr.c
> +++ b/iconvdata/euc-kr.c
> @@ -83,7 +83,7 @@ euckr_from_ucs4 (uint32_t ch, unsigned char *cp)
> /* 0xfe(->0x7e : row 94) and 0xc9(->0x59 : row 41) are \
> user-defined areas. */ \
> else if (__builtin_expect (ch == 0xa0, 0) \
> - || __builtin_expect (ch > 0xfe, 0) \
> + || __builtin_expect (ch >= 0xfe, 0) \
> || __builtin_expect (ch == 0xc9, 0)) \
> { \
> /* This is illegal. */ \
>
We should aim to use __glibc_{un}likely for new code.
More information about the Libc-alpha
mailing list