[PATCH 1/7] server: Don't stop processing change notifications when name length is 0.
It's legitimate to receive a notification with len = 0. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- server/change.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/change.c b/server/change.c index d00a885dd2..9577f56d86 100644 --- a/server/change.c +++ b/server/change.c @@ -949,11 +949,10 @@ static void inotify_poll_event( struct fd *fd, int event ) for( ofs = 0; ofs < r - offsetof(struct inotify_event, name); ) { ie = (struct inotify_event*) &buffer[ofs]; - if (!ie->len) - break; ofs += offsetof( struct inotify_event, name[ie->len] ); if (ofs > r) break; - inotify_notify_all( ie ); + if (ie->len) + inotify_notify_all( ie ); } } -- 2.17.1
participants (1)
-
Dmitry Timoshkov