update openharmony 1.0.1
This commit is contained in:
6
kernel/base/misc/vm_shellcmd.c
Normal file → Executable file
6
kernel/base/misc/vm_shellcmd.c
Normal file → Executable file
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
@@ -152,7 +152,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsShellCmdV2P(INT32 argc, const CHAR *argv[])
|
||||
} else if (argc == 2) {
|
||||
pid_t pid = OsPid(argv[0]);
|
||||
vaddr = strtoul((CHAR *)argv[1], &endPtr, 0);
|
||||
if ((endPtr == NULL) || (*endPtr != 0)) {
|
||||
if ((endPtr == NULL) || (*endPtr != 0) || !LOS_IsUserAddress(vaddr)) {
|
||||
PRINTK("vaddr %s invalid. should be in range(0x1000000~0x3e000000) \n", argv[1]);
|
||||
return OS_ERROR;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user