diff options
author | gordon <gordon@FreeBSD.org> | 2019-07-03 00:00:39 +0000 |
---|---|---|
committer | gordon <gordon@FreeBSD.org> | 2019-07-03 00:00:39 +0000 |
commit | bb9c9feec1b4f2f8a0b951088a4b1636e5382a3f (patch) | |
tree | f6fdc4c4203613f7b0b0188ebc09b0974a4c965d | |
parent | adf9042df114fad3b93ef58d85685c3ffebdca9b (diff) | |
download | FreeBSD-src-bb9c9feec1b4f2f8a0b951088a4b1636e5382a3f.zip FreeBSD-src-bb9c9feec1b4f2f8a0b951088a4b1636e5382a3f.tar.gz |
Fix iconv buffer overflow.
Approved by: so
Approved by: re (implicit)
Security: FreeBSD-SA-19:09.iconv
-rw-r--r-- | lib/libc/iconv/citrus_none.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/iconv/citrus_none.c b/lib/libc/iconv/citrus_none.c index 56e157a..708b74a 100644 --- a/lib/libc/iconv/citrus_none.c +++ b/lib/libc/iconv/citrus_none.c @@ -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); } |