Fix iconv buffer overflow.
Approved by: so Approved by: re (implicit) Security: FreeBSD-SA-19:09.iconv
This commit is contained in:
parent
6eb679187a
commit
05677f927a
|
@ -142,7 +142,7 @@ _citrus_NONE_stdenc_cstomb(struct _citrus_stdenc * __restrict ce __unused,
|
|||
s[2] = (char)(idx >> 16);
|
||||
*nresult = 3;
|
||||
} else {
|
||||
if (n < 3) {
|
||||
if (n < 4) {
|
||||
*nresult = (size_t)-1;
|
||||
return (E2BIG);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue