mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 19:00:07 +00:00
In conversion to ISO-2022-JP, add two missing buffer size checks.
This commit is contained in:
parent
7e7b6007f2
commit
87f6057a31
@ -577,6 +577,12 @@ gconv_end (struct __gconv_step *data)
|
||||
{ \
|
||||
if (set2 == ISO88591_set) \
|
||||
{ \
|
||||
if (__builtin_expect (outptr + 3 > outend, 0)) \
|
||||
{ \
|
||||
result = __GCONV_FULL_OUTPUT; \
|
||||
break; \
|
||||
} \
|
||||
\
|
||||
if (ch >= 0x80 && ch <= 0xff) \
|
||||
{ \
|
||||
*outptr++ = ESC; \
|
||||
@ -596,6 +602,12 @@ gconv_end (struct __gconv_step *data)
|
||||
unsigned char res = iso88597_from_ucs4[ch - 0xa0 + rp->idx]; \
|
||||
if (res != '\0') \
|
||||
{ \
|
||||
if (__builtin_expect (outptr + 3 > outend, 0)) \
|
||||
{ \
|
||||
result = __GCONV_FULL_OUTPUT; \
|
||||
break; \
|
||||
} \
|
||||
\
|
||||
*outptr++ = ESC; \
|
||||
*outptr++ = 'N'; \
|
||||
*outptr++ = res; \
|
||||
|
Loading…
Reference in New Issue
Block a user