Bug 8070 - kudzu hangs (seg-fault) when probing parallel port
Summary: kudzu hangs (seg-fault) when probing parallel port
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kudzu
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-12-30 18:31 UTC by gio
Modified: 2014-03-17 02:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-12-30 18:34:54 UTC
Embargoed:


Attachments (Terms of Use)

Description gio 1999-12-30 18:31:34 UTC
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)

*** 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 18:34:59 UTC
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.