Skip to content

Commit

Permalink
Fix iconv buffer overflow.
Browse files Browse the repository at this point in the history
Approved by:	so
Approved by:	re (implicit)
Security:	FreeBSD-SA-19:09.iconv
  • Loading branch information
tetlowgm authored and fichtner committed Jul 3, 2019
1 parent 6eb6791 commit 05677f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libc/iconv/citrus_none.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 05677f9

Please sign in to comment.