mirror of https://github.com/omar-polo/gmid.git
fix out-of-bounds access
obviously msg[datalen] is an off-by-one
This commit is contained in:
parent
2c3e53dac6
commit
de62c38d81
2
log.c
2
log.c
|
@ -252,7 +252,7 @@ handle_log(int fd, short ev, void *d)
|
||||||
|
|
||||||
datalen = imsg.hdr.len - IMSG_HEADER_SIZE;
|
datalen = imsg.hdr.len - IMSG_HEADER_SIZE;
|
||||||
msg = imsg.data;
|
msg = imsg.data;
|
||||||
msg[datalen] = '\0';
|
msg[datalen-1] = '\0';
|
||||||
|
|
||||||
/* ignore imsg.hdr.type for now */
|
/* ignore imsg.hdr.type for now */
|
||||||
if (conf.foreground)
|
if (conf.foreground)
|
||||||
|
|
Loading…
Reference in New Issue