Bug 56773 - please fix pci.c with this fix
please fix pci.c with this fix
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: kudzu (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-27 08:52 EST by Noel Koethe
Modified: 2014-03-16 22:24 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-11-29 07:03:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Noel Koethe 2001-11-27 08:52:02 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:0.9.5) Gecko/20011023

Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1..
2..
3..
	

Additional info:

--- pci.c.orig  Thu Nov 15 19:30:19 2001
+++ pci.c       Thu Nov 15 19:31:58 2001
@@ -224,7 +224,7 @@
        int x;
        
        x=strchr(searchDev->desc,'|')-searchDev->desc;
-       tmpstr=calloc(x+1,sizeof(char));
+       if(x<=0 || !(tmpstr=calloc(x+1,sizeof(char)))) return NULL;
        tmpstr=strncpy(tmpstr,searchDev->desc,x);
        tmpstr[x] = '\0';
        return tmpstr;
Comment 1 Bill Nottingham 2001-11-28 01:27:13 EST
Hm, maybe. It implies invalid data in the pcitable, though, and that should be
fixed.
Comment 2 Noel Koethe 2001-11-29 07:03:12 EST
But kudzu should handle such errors in a better way than to crash.
Comment 3 Bill Nottingham 2002-01-03 22:09:20 EST
Added in 0.99.41-1 - thanks.

Note You need to log in before you can comment on or make changes to this bug.