mirror of https://github.com/hak5/openwrt-owl.git
hotplug2: fix "MALLOC FAILURE!" message caused by a missing return code check on recv()
SVN-Revision: 18061owl
parent
0b077fa3a7
commit
47ba8235cd
|
@ -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)
|
Loading…
Reference in New Issue