Prevent fix
authorSunwook Bae <sunwook45.bae@samsung.com>
Fri, 19 Apr 2013 00:45:09 +0000 (09:45 +0900)
committerSunwook Bae <sunwook45.bae@samsung.com>
Fri, 19 Apr 2013 00:45:09 +0000 (09:45 +0900)
Change-Id: I804d8312e121555ffaff5cbaad1a60896eec089f
Signed-off-by: Sunwook Bae <sunwook45.bae@samsung.com>
src/io/FIo_FileEventManagerImpl.cpp

index 9ce1b20..28858ef 100644 (file)
@@ -133,7 +133,7 @@ _FileEventManagerImpl::SendEvent(void)
 {
        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;
@@ -142,7 +142,7 @@ _FileEventManagerImpl::SendEvent(void)
 
        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))