mirror of
https://github.com/troglobit/finit.git
synced 2026-11-21 19:51:46 +00:00
keventd: properly zero terminate buffer, found by Coverity Scan
Also, fix default: case in error handling, must always continue back to poll() on any recv() error. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
2a23bce78d
commit
c24207516d
1 file changed
+2
-1
+2
-1
@@ -227,9 +227,10 @@ int main(int argc, char *argv[])
|
|||||||
continue;
|
continue;
|
||||||
default:
|
default:
|
||||||
panic("unhandled");
|
panic("unhandled");
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
buf[len] = 0;
|
||||||
|
|
||||||
/* skip libusb events, focus on kernel events/changes */
|
/* skip libusb events, focus on kernel events/changes */
|
||||||
if (strncmp(buf, "change@", 7))
|
if (strncmp(buf, "change@", 7))
|
||||||
|
|||||||
Reference in new issue
Block a user