!249 kernel/extended/trace/los_trace.c中可能存在空指针访问

Merge pull request !249 from boxi/upload
This commit is contained in:
openharmony_ci 2021-05-19 14:46:18 +08:00 committed by Gitee
commit 8a48f4926a
1 changed files with 1 additions and 1 deletions

View File

@ -454,7 +454,7 @@ UINT32 OsShellCmdTraceSwitch(INT32 argc, const CHAR **argv)
if (isdigit(argv[0][0]) != 0) {
CHAR *endPtr = NULL;
UINT32 traceType = strtoul(argv[0], &endPtr, 0);
if ((endPtr != NULL) || (*endPtr != 0)) {
if ((endPtr == NULL) || (*endPtr != 0)) {
PRINTK("Unknown option: %s\n", argv[0]);
goto TRACE_HELP;
}