From owner-p4-projects@FreeBSD.ORG Thu Jun 15 06:29:01 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A47EB16A479; Thu, 15 Jun 2006 06:29:01 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 818E916A47D for ; Thu, 15 Jun 2006 06:29:01 +0000 (UTC) (envelope-from ryanb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 51DAF43D45 for ; Thu, 15 Jun 2006 06:29:01 +0000 (GMT) (envelope-from ryanb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k5F6T1SZ099655 for ; Thu, 15 Jun 2006 06:29:01 GMT (envelope-from ryanb@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k5F6T1lO099650 for perforce@freebsd.org; Thu, 15 Jun 2006 06:29:01 GMT (envelope-from ryanb@FreeBSD.org) Date: Thu, 15 Jun 2006 06:29:01 GMT Message-Id: <200606150629.k5F6T1lO099650@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ryanb@FreeBSD.org using -f From: Ryan Beasley To: Perforce Change Reviews Cc: Subject: PERFORCE change 99283 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jun 2006 06:29:01 -0000 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) :