Bug 8070 - kudzu hangs (seg-fault) when probing parallel port
kudzu hangs (seg-fault) when probing parallel port
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: kudzu (Show other bugs)
6.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-12-30 13:31 EST by gio
Modified: 2014-03-16 22:11 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-12-30 13:34:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description gio 1999-12-30 13:31:34 EST
I've installed Red Hat 6.1 after which I've recompiled a linux kernel
version 2.2.13 with parallel port support built-in. After that
kudzu has begun to hang with a segmentation-fault (because mfr is NULL);
I've patched it and now it seems working properly. I hope this helps.

Giovanni Lagorio (gio@libertyline.com)

*** parallel.c-orig	Thu Dec 30 14:33:27 1999
--- parallel.c	Thu Dec 30 14:48:03 1999
***************
*** 255,261 ****
  	probebuf=calloc(8192,sizeof(char));
  	bytes=read(lpfile,probebuf,8192);

! 	mfr=model=desc=func=modes=NULL;
  	ptr = probebuf;
  	while (probebuf[0]!='\0') {
  		while (*ptr && *ptr !='\n') ptr++;
--- 255,264 ----
  	probebuf=calloc(8192,sizeof(char));
  	bytes=read(lpfile,probebuf,8192);

! 	mfr=strdup("Unknown vendor") ;
! 	model=strdup("Unknown device") ;
! 	desc=func=modes=NULL ;
!
  	ptr = probebuf;
  	while (probebuf[0]!='\0') {
  		while (*ptr && *ptr !='\n') ptr++;
***************
*** 282,288 ****
  		}
  		probebuf=ptr;
  	}
! 	if (!strcmp(mfr,"Unknown vendor")&&!strcmp(model,"Unknown device"))
return NULL;
  	key.pnpmfr = mfr;
  	key.pnpmodel = model;
  	pardev = bsearch(&key,parallelDeviceList,numParallelDevices,
--- 285,298 ----
  		}
  		probebuf=ptr;
  	}
! 	if (!strcmp(mfr,"Unknown vendor")&&!strcmp(model,"Unknown device")) {
! 		if (mfr) free(mfr);
! 		if (model) free(model);
! 		if (func) free(func);
! 		if (modes) free(modes);
! 		if (desc) free(desc);
! 		return NULL;
! 	}
  	key.pnpmfr = mfr;
  	key.pnpmodel = model;
  	pardev = bsearch(&key,parallelDeviceList,numParallelDevices,
Comment 1 Bill Nottingham 1999-12-30 13:34:59 EST
This should be fixed in the latest kudzu currently in
Raw Hide (albeit fixed differently)

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