From ce5ec2c559a67090e17f19b9a8c8686e413c2ad8 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Tue, 2 Jul 2019 23:56:37 +0000 Subject: [PATCH] libc: correct iconv buffer overflow admbugs: 920 Submitted by: Andrea Venturoli, gabor Reported by: Andrea Venturoli , NetFence Security: CVE-2019-5600 Security: FreeBSD-SA-19:09.iconv --- lib/libc/iconv/citrus_none.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/iconv/citrus_none.c b/lib/libc/iconv/citrus_none.c index bb1f963a6be..033fe4011e0 100644 --- a/lib/libc/iconv/citrus_none.c +++ b/lib/libc/iconv/citrus_none.c @@ -144,7 +144,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); }