From 9423094e94babea121d39cdb66123ccac48a2c65 Mon Sep 17 00:00:00 2001 From: Li Xiaoming Date: Mon, 26 Aug 2019 19:06:19 +0800 Subject: 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 Signed-off-by: Li Xiaoming --- tsutils/tsplayer/tsplayer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tsutils') 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) -- cgit 1.2.3-korg