summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi Xiaoming <lixm.fnst@cn.fujitsu.com>2019-08-26 19:06:19 +0800
committerLi Xiaoming <lixm.fnst@cn.fujitsu.com>2019-08-26 11:25:45 +0000
commit9423094e94babea121d39cdb66123ccac48a2c65 (patch)
tree5aeabe179dfecd34f944fd3eca968d4a8dc35879
parent1eab9326969b3c56a233f4285bb716a3939a703f (diff)
Fix mistake introduced by commit 94122a8f011fc629
The second index should point to next arg. It's my fault in the former patch. Because strlen do no calculate the string termination character, the string length should plus 1. Bug-AGL: SPEC-2422 Change-Id: Iadf3a74d7e5ef813a054aa3c62e9bbd8e5f84371 Signed-off-by: wanglu <wang_lu@dl.cn.nexty-ele.com> Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
-rw-r--r--tsutils/tsplayer/tsplayer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tsutils/tsplayer/tsplayer.c b/tsutils/tsplayer/tsplayer.c
index acb968b..e197519 100644
--- a/tsutils/tsplayer/tsplayer.c
+++ b/tsutils/tsplayer/tsplayer.c
@@ -280,7 +280,7 @@ int main(int argc,char *argv[])
{
if (strcmp(argv[index], "-f") == 0)
{
- memcpy(eventFileName, argv[index + 1], strlen(argv[index]));
+ memcpy(eventFileName, argv[index + 1], strlen(argv[index + 1]) + 1);
index++;
}
else if (strcmp(argv[index], "-d") == 0)