make sure there is room for null terminator
This commit is contained in:
1 parent
a2fa5cbc44
commit
bb9cf8ec40
1 file changed
+1
-1
@@ -657,7 +657,7 @@ int CmdTraceListAlias(const char *Cmd, const char *alias, const char *protocol)
|
|||||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||||
char args[128] = {0};
|
char args[128] = {0};
|
||||||
snprintf(args, sizeof(args), "-t %s ", protocol);
|
snprintf(args, sizeof(args), "-t %s ", protocol);
|
||||||
strncat(args, Cmd, sizeof(args) - strlen(args));
|
strncat(args, Cmd, sizeof(args) - strlen(args) - 1);
|
||||||
return CmdTraceList(args);
|
return CmdTraceList(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user