Try to prevent out-of-bounds write

This commit is contained in:
twinaphex 2017-06-07 23:03:08 +02:00
parent a371815efd
commit 5c84f9158e

View File

@ -155,7 +155,7 @@ retry:
{
struct inotify_event *event = (struct inotify_event*)&event_buf[0];
event_buf[rc] = '\0';
event_buf[rc-1] = '\0';
/* Can read multiple events in one read() call. */