kiconv related enhancement

R. Imura imura at ryu16.org
Wed Aug 24 12:49:58 GMT 2005


Hi,

On Tue, Aug 23, 2005 at 04:34:56PM +0200, Rudolf Cejka wrote:
> Please, do you have a plan to fix ranges too? You have either allocate
> sufficient space (ICONV_CSNMAXLEN + 1 instead of just ICONV_CSNMAXLEN),
> or check for string length >= ICONV_CSNMAXLEN instead of > ICONV_CSNMAXLEN.
> The second problem is that some strcpy()s could overwrite one byte
> after allocated space and strnpcy()s could produce unterminated
> strings - everything is around egrep -r "ICONV_C(S|NV)NMAXLEN" /usr/src.
> The last problem is that sys/libkern/iconv.c does not check the length
> of from and to in iconv_sysctl_add(), which can be source of unexpected
> results.

Thanks.  Fixed.
I remember that this is the second time you ask me about the issue.
I apologize that I'm late, and thank you for testing new patches.

Redards,
- R. Imura


More information about the freebsd-current mailing list