Found with the Clang Static Analyzer.
memcpy(walk, &type, sizeof(uint32_t));
walk += sizeof(uint32_t);
- strncpy(walk, payload, len);
+ if (payload != NULL)
+ strncpy(walk, payload, len);
uint32_t written = 0;
/* These are only relevant for XKB, which we only need for grabbing modifiers */
Display *xkb_dpy;
int xkb_event_base;
-int mod_pressed;
+int mod_pressed = 0;
/* Because the statusline is the same on all outputs, we have
* global buffer to render it on */
*/
void xkb_io_cb(struct ev_loop *loop, ev_io *watcher, int revents) {
XkbEvent ev;
- int modstate;
+ int modstate = 0;
DLOG("Got XKB-Event!\n");