From 59ee84abdf93edd551fd2c274bdf53ada93310ad Mon Sep 17 00:00:00 2001 From: Munkyu Im Date: Mon, 24 Apr 2017 18:20:57 +0900 Subject: [PATCH] sync: fix excluded files issue when execute "sdb pull" command need 1 length more to handle null terminated. Change-Id: I0da67c726cc2b68d636faac42c46c860c2ec892b Signed-off-by: Munkyu Im --- src/file_sync_service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file_sync_service.c b/src/file_sync_service.c index d4d35eb..f2da4c1 100644 --- a/src/file_sync_service.c +++ b/src/file_sync_service.c @@ -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); -- 2.7.4