From ddf404afa8a0ccd0694cc5e60d9ace07d712b68b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 22 Apr 2003 09:45:00 +0000 Subject: - Use read() instead of fread() to read from "/proc/bus/pci/%02x/%02x.%d". Thanks a lot to Tom Cox for finding this bug: The proc.c module in the kernel source clearly states that reading more than 64 bytes can cause problems. The pci.c module in the ldetect library uses the buffered fread() function. This function always reads in blocks, so when run as root, the read always tried to read more than the user requested amount. This should fix freezes when doing a full probe --- ldetect.spec | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ldetect.spec b/ldetect.spec index a91e396..399c720 100644 --- a/ldetect.spec +++ b/ldetect.spec @@ -1,5 +1,5 @@ Name: ldetect -Version: 0.4.8 +Version: 0.4.9 Release: 1mdk Summary: Light hardware detection library Source: %name.tar.bz2 @@ -49,6 +49,19 @@ rm -rf $RPM_BUILD_ROOT %_libdir/* %changelog +* Tue Apr 22 2003 Pixel 0.4.9-1mdk +- Use read() instead of fread() to read from "/proc/bus/pci/%02x/%02x.%d". + Thanks a lot to Tom Cox for finding this bug: + + The proc.c module in the kernel source clearly states that + reading more than 64 bytes can cause problems. The pci.c + module in the ldetect library uses the buffered fread() + function. This function always reads in blocks, so when + run as root, the read always tried to read more than the + user requested amount. + + This should fix freezes when doing a full probe + * Mon Jan 6 2003 Thierry Vignaud 0.4.8-1mdk - require an usbutils recent enough to have working hub class - fix hubs detection -- cgit v1.2.1