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:
Joachim Wiberg committed 2021-05-31 07:22:50 +02:00
1 parent 2a23bce78d
commit c24207516d
1 file changed
+2 -1
+2 -1
View File
@@ -227,9 +227,10 @@ int main(int argc, char *argv[])
continue;
default:
panic("unhandled");
break;
continue;
}
}
buf[len] = 0;
/* skip libusb events, focus on kernel events/changes */
if (strncmp(buf, "change@", 7))