kern/141682: [libc] [patch] Faster version of strncpy(3)
Jaakko Heinonen
jh at FreeBSD.org
Fri Jan 15 19:20:02 UTC 2010
The following reply was made to PR kern/141682; it has been noted by GNATS.
From: Jaakko Heinonen <jh at FreeBSD.org>
To: Maxim Zakharov <maxime at maxime.net.ru>
Cc: bug-followup at 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
More information about the freebsd-bugs
mailing list