[Bug 207302] Iconv uses strlen directly on user supplied memory
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Feb 18 10:38:33 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207302
--- Comment #1 from CTurt <cturt at hardenedbsd.org> ---
Patch:
https://github.com/HardenedBSD/hardenedBSD-playground/commit/1bcd4a2c6f3a256b2db03fc9421857a7f7963f34.patch
It may potentially be more pleasing to use:
if (strnlen(din.ia_from, ICONV_CSNMAXLEN) >= ICONV_CSNMAXLEN)
But I opted for using `sizeof` on the string instead:
if (strnlen(din.ia_from, sizeof(din.ia_from)) >= ICONV_CSNMAXLEN)
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list