fix initialization of struct sigaction
PATCH 1/1 fix initialization of struct sigaction
Hi,
This fixes the initialization of
struct sigaction act;
Valgrind complains about this as follows:
==4304== Syscall param sigaction(act) contains uninitialised or unaddressable byte(s)
==4304== at 0x804A37B: (within /sbin/udevd)
==4304== Address 0x52BFE7FC is on thread 1's stack
Signature · 14 lines
Regards Michael Buesch [ http://www.tuxsoft.de.vu ]
===== udevd.c 1.64 vs edited =====
--- 1.64/udevd.c 2005-01-16 16:53:07 +01:00
+++ edited/udevd.c 2005-02-05 15:42:39 +01:00
@@ -690,6 +690,7 @@
dbg("error fcntl on write pipe: %s", strerror(errno));
/* set signal handlers */
+ memset(&act, 0x00, sizeof(act));
act.sa_handler = (void (*) (int))sig_handler;
sigemptyset(&act.sa_mask);
act.sa_flags = SA_RESTART;===== udevd.c 1.64 vs edited =====
udevd.c +1 -0
@@ -690,6 +690,7 @@dbg ("error fcntl on write pipe: %s" ,strerror (errno));/* set signal handlers */ +memset (&act,0x00 ,sizeof (act)); act.sa_handler = (void (*) (int ))sig_handler;sigemptyset (&act.sa_mask); act.sa_flags =SA_RESTART ;
Kay Sievers
AppliedQuoted 7 lines · Michael Buesch
This fixes the initialization of
struct sigaction act;
Valgrind complains about this as follows:=4304= Syscall param sigaction(act) contains uninitialised or unaddressable byte(s)
=4304= at0x804A37B: (within/sbin/udevd)
=4304= Address0x52BFE7FCis on thread 1's stack
Applied.
Thanks,
Kay
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel