Subject: pkg/19715: pwlib patch incomplete
To: None <gnats-bugs@gnats.netbsd.org>
From: None <andreas@planix.com>
List: netbsd-bugs
Date: 01/06/2003 14:02:08
>Number:         19715
>Category:       pkg
>Synopsis:       devel/pwlib/patch-ag check for audio uses wrong length
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 06 11:03:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Andreas Wrede <andreas@planix.com>
>Release:        NetBSD 1.6K
>Organization:
Planix, Inc.
>Environment:
	
	
System: NetBSD woffi.planix.com 1.6K NetBSD 1.6K (PLANIX) #4: Sat Jan 4 13:18:31 EST 2003 root@woffi.planix.com:/m5/netbsd-current/src/sys/arch/i386/compile/WOFFI i386
Architecture: i386
Machine: i386
>Description:
devel/pwlib/patch-ag check for audio uses wrong length. Spotted by
Roger Hardiman.

>How-To-Repeat:
inspect code
>Fix:
Apply:

Index: patch-ag
===================================================================
RCS file: /cvsroot/pkgsrc/devel/pwlib/patches/patch-ag,v
retrieving revision 1.2
diff -c -r1.2 patch-ag
*** patch-ag	2002/12/01 18:31:42	1.2
--- patch-ag	2003/01/06 18:56:57
***************
*** 21,27 ****
  +        }
  +        // Look for audioN. Insert at position cardnum + 1
  +        if ((filename.GetLength() > 5) && (filename.Left(5) == "audio")) {
! +	  PString numbers = filename.Mid(3); // get everything after 'audio'
  +	  if (IsNumericString(numbers)) {
  +            PINDEX cardnum = numbers.AsInteger();
  +            dsp.SetAt(cardnum+1, devname);
--- 21,27 ----
  +        }
  +        // Look for audioN. Insert at position cardnum + 1
  +        if ((filename.GetLength() > 5) && (filename.Left(5) == "audio")) {
! +	  PString numbers = filename.Mid(5); // get everything after 'audio'
  +	  if (IsNumericString(numbers)) {
  +            PINDEX cardnum = numbers.AsInteger();
  +            dsp.SetAt(cardnum+1, devname);
>Release-Note:
>Audit-Trail:
>Unformatted: