diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/notify_inotify.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/smbd/notify_inotify.c b/source3/smbd/notify_inotify.c index 61599456c6..b1d424d7f1 100644 --- a/source3/smbd/notify_inotify.c +++ b/source3/smbd/notify_inotify.c @@ -246,8 +246,9 @@ static void inotify_handler(struct event_context *ev, struct fd_event *fde, return; } - e0 = e = (struct inotify_event *)TALLOC_SIZE(in, bufsize); + e0 = e = (struct inotify_event *)TALLOC_SIZE(in, bufsize + 1); if (e == NULL) return; + ((uint8_t *)e)[bufsize] = '\0'; status = read_data(in->fd, (char *)e0, bufsize); if (!NT_STATUS_IS_OK(status)) { |