PERFORCE change 99283 for review
Ryan Beasley
ryanb at FreeBSD.org
Thu Jun 15 06:29:01 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=99283
Change 99283 by ryanb at 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) :
More information about the p4-projects
mailing list