提交 4d863e98 编写于 作者: B boxi

fix: Fix wrong judgment in los_trace.c to avoid null pointer access.

Fix wrong judgment in los_trace.c to avoid null pointer access.

Close #I3RT9F

Change-Id: Id37b80fc6acc085205695318232d5f4fd75472aa
上级 e7c0c517
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册