* [PATCH] fix udevd read from /proc stat file
@ 2005-09-13 19:13 Amir Shalem
2005-09-14 15:34 ` Kay Sievers
0 siblings, 1 reply; 2+ messages in thread
From: Amir Shalem @ 2005-09-13 19:13 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1.1: Type: text/plain, Size: 150 bytes --]
fix two udevd read() calls from /proc stat file,
must make sure there's room for null byte in buffer
which we put in after read()
--
Amir.
[-- Attachment #1.2: write-over-end.diff --]
[-- Type: text/plain, Size: 482 bytes --]
diff -Nur udev-068.orig/udevd.c udev-068/udevd.c
--- udev-068.orig/udevd.c Thu Aug 18 20:04:49 2005
+++ udev-068/udevd.c Tue Sep 13 21:31:38 2005
@@ -205,7 +205,7 @@
if (f == -1)
return -1;
- len = read(f, buf, sizeof(buf));
+ len = read(f, buf, sizeof(buf)-1);
close(f);
if (len <= 0)
@@ -254,7 +254,7 @@
if (f == -1)
continue;
- len = read(f, line, sizeof(line));
+ len = read(f, line, sizeof(line)-1);
close(f);
if (len <= 0)
[-- Attachment #2: Type: application/pgp-signature, Size: 187 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fix udevd read from /proc stat file
2005-09-13 19:13 [PATCH] fix udevd read from /proc stat file Amir Shalem
@ 2005-09-14 15:34 ` Kay Sievers
0 siblings, 0 replies; 2+ messages in thread
From: Kay Sievers @ 2005-09-14 15:34 UTC (permalink / raw)
To: linux-hotplug
On Tue, Sep 13, 2005 at 10:13:39PM +0300, Amir Shalem wrote:
> fix two udevd read() calls from /proc stat file,
> must make sure there's room for null byte in buffer
> which we put in after read()
Applied!
Thanks,
Kay
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-09-14 15:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-13 19:13 [PATCH] fix udevd read from /proc stat file Amir Shalem
2005-09-14 15:34 ` Kay Sievers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).