aboutsummaryrefslogtreecommitdiffstats
path: root/package/hotplug2
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-10-19 02:39:02 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-10-19 02:39:02 +0000
commit15551bacbf3c8b78b502f97a4c9ff8a297a30999 (patch)
tree58ff27972d203638e432c2cbbc15203396c1f715 /package/hotplug2
parent08cce6702e4a883a8337b9f7f11cc39993e5cb6d (diff)
downloadmaster-187ad058-15551bacbf3c8b78b502f97a4c9ff8a297a30999.tar.gz
master-187ad058-15551bacbf3c8b78b502f97a4c9ff8a297a30999.tar.bz2
master-187ad058-15551bacbf3c8b78b502f97a4c9ff8a297a30999.zip
hotplug2: fix "MALLOC FAILURE!" message caused by a missing return code check on recv()
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18061 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/hotplug2')
-rw-r--r--package/hotplug2/patches/100-recv_check.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/package/hotplug2/patches/100-recv_check.patch b/package/hotplug2/patches/100-recv_check.patch
new file mode 100644
index 0000000000..168df47bb0
--- /dev/null
+++ b/package/hotplug2/patches/100-recv_check.patch
@@ -0,0 +1,12 @@
+--- a/hotplug2.c
++++ b/hotplug2.c
+@@ -300,6 +300,9 @@ int main(int argc, char *argv[]) {
+ worker_ctx = settings->worker->module->init(settings);
+ while (process) {
+ size = recv(settings->netlink_socket, &buffer, sizeof(buffer), 0);
++ if (size < 0)
++ continue;
++
+ uevent = uevent_deserialize(buffer, size);
+
+ if (uevent == NULL)