From: Munkyu Im Date: Mon, 24 Apr 2017 09:20:57 +0000 (+0900) Subject: sync: fix excluded files issue when execute "sdb pull" command X-Git-Tag: accepted/tizen/unified/20170426.061634~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=59ee84abdf93edd551fd2c274bdf53ada93310ad;p=sdk%2Ftarget%2Fsdbd.git 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 --- 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);