{
unsigned long iter = 0;
ssize_t length = 0;
- char buffer[INOTIFY_BUFFER_LEN] = {0,};
+ char buffer[INOTIFY_BUFFER_LEN + 1] = {0,};
unsigned long event = 0;
String path;
SysTryReturnResult(NID_IO, __inotifyFd != -1, E_IO, "Failed to inotify.");
- length = read(__inotifyFd, buffer, INOTIFY_BUFFER_LEN -1);
+ length = read(__inotifyFd, buffer, INOTIFY_BUFFER_LEN);
SysTryReturnResult(NID_IO, length < (long)INOTIFY_BUFFER_LEN, E_IO, "Read buffer has failed.");
while (iter < static_cast<unsigned long> (length))