summaryrefslogtreecommitdiff
path: root/package/hotplug2/patches/100-recv_check.patch
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
commit47ba8235cd380c5b0d042335fd609c1d72d06377 (patch)
tree294cf4419fcb46e0598111bcc838ea04dde64e3f /package/hotplug2/patches/100-recv_check.patch
parent0b077fa3a720c53504d5cda7e0e48001aca36ac8 (diff)
downloadmtk-20170518-47ba8235cd380c5b0d042335fd609c1d72d06377.zip
mtk-20170518-47ba8235cd380c5b0d042335fd609c1d72d06377.tar.gz
mtk-20170518-47ba8235cd380c5b0d042335fd609c1d72d06377.tar.bz2
hotplug2: fix "MALLOC FAILURE!" message caused by a missing return code check on recv()
SVN-Revision: 18061
Diffstat (limited to 'package/hotplug2/patches/100-recv_check.patch')
-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 0000000..168df47
--- /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)