Date: Thu, 15 Jun 2006 06:29:01 GMT From: Ryan Beasley <ryanb@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 99283 for review Message-ID: <200606150629.k5F6T1lO099650@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=99283 Change 99283 by ryanb@ryanb_yuki on 2006/06/15 06:28:44 Correct misuse of strncpy's length argument. Affected files ... .. //depot/projects/soc2006/rbeasley_sound/sys/dev/sound/pcm/sound.c#3 edit Differences ... ==== //depot/projects/soc2006/rbeasley_sound/sys/dev/sound/pcm/sound.c#3 (text+ko) ==== @@ -1140,8 +1140,8 @@ static char si_product[] = "OSS/FreeBSD"; static char si_version[] = "4.0.0a"; - strncpy(si->product, si_product, sizeof(si->product)); - strncpy(si->version, si_version, sizeof(si->version)); + strncpy(si->product, si_product, sizeof(si->product) - 1); + strncpy(si->version, si_version, sizeof(si->version) - 1); si->versionnum = SOUND_VERSION; si->numaudios = (pcm_devclass != NULL) ? devclass_get_count(pcm_devclass) :
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606150629.k5F6T1lO099650>