diff options
author | Li Xiaoming <lixm.fnst@cn.fujitsu.com> | 2019-08-26 19:06:19 +0800 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2019-08-28 14:50:50 +0000 |
commit | f577736a736dae0c5e32b2c3f63101ece9bdf4f8 (patch) | |
tree | 5aeabe179dfecd34f944fd3eca968d4a8dc35879 | |
parent | b9b14dda5ed0e06c4b6e59512b1289ba81a4e765 (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>
(cherry picked from commit 9423094e94babea121d39cdb66123ccac48a2c65)
-rw-r--r-- | tsutils/tsplayer/tsplayer.c | 2 |
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)
|