Date: Fri, 15 Jan 2010 19:20:02 GMT From: Jaakko Heinonen <jh@FreeBSD.org> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/141682: [libc] [patch] Faster version of strncpy(3) Message-ID: <201001151920.o0FJK2dU007783@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/141682; it has been noted by GNATS. From: Jaakko Heinonen <jh@FreeBSD.org> To: Maxim Zakharov <maxime@maxime.net.ru> Cc: bug-followup@FreeBSD.org Subject: Re: kern/141682: [libc] [patch] Faster version of strncpy(3) Date: Fri, 15 Jan 2010 21:12:29 +0200 Hi, On 2009-12-17, Maxim Zakharov wrote: > void * dps_strncpy(char *dst0, char *src0, size_t length) { > if (length) { > register size_t n = (length + 7) / 8; This won't work with length values larger than SIZE_MAX - 7 due to integer overflow. -- Jaakko
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001151920.o0FJK2dU007783>