sync: fix excluded files issue when execute "sdb pull" command 12/126612/2
authorMunkyu Im <munkyu.im@samsung.com>
Mon, 24 Apr 2017 09:20:57 +0000 (18:20 +0900)
committermunkyu im <munkyu.im@samsung.com>
Mon, 24 Apr 2017 09:43:17 +0000 (09:43 +0000)
need 1 length more to handle null terminated.

Change-Id: I0da67c726cc2b68d636faac42c46c860c2ec892b
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
src/file_sync_service.c

index d4d35eb..f2da4c1 100644 (file)
@@ -220,7 +220,7 @@ static int do_list(int s, const char *path)
             continue;
         }
 
-        s_strncpy(fname, de->d_name, len);
+        s_strncpy(fname, de->d_name, len + 1);
         if(lstat(tmp, &st) == 0) {
             msg.dent.mode = htoll(st.st_mode);
             msg.dent.size = htoll(st.st_size);