diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-10-19 02:39:02 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-10-19 02:39:02 +0000 |
commit | 47ba8235cd380c5b0d042335fd609c1d72d06377 (patch) | |
tree | 294cf4419fcb46e0598111bcc838ea04dde64e3f /package/hotplug2/patches | |
parent | 0b077fa3a720c53504d5cda7e0e48001aca36ac8 (diff) | |
download | upstream-47ba8235cd380c5b0d042335fd609c1d72d06377.tar.gz upstream-47ba8235cd380c5b0d042335fd609c1d72d06377.tar.bz2 upstream-47ba8235cd380c5b0d042335fd609c1d72d06377.zip |
hotplug2: fix "MALLOC FAILURE!" message caused by a missing return code check on recv()
SVN-Revision: 18061
Diffstat (limited to 'package/hotplug2/patches')
-rw-r--r-- | package/hotplug2/patches/100-recv_check.patch | 12 |
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) |