projects
/
platform
/
core
/
api
/
thread.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d67764
)
Add defense code for null param
75/272875/1
author
hyunuk.tak
<hyunuk.tak@samsung.com>
Mon, 21 Mar 2022 06:28:54 +0000
(15:28 +0900)
committer
hyunuk.tak
<hyunuk.tak@samsung.com>
Mon, 28 Mar 2022 01:49:22 +0000
(10:49 +0900)
Change-Id: I1b2d4584862f88c50295fac18c6c996b24491958
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
tests/unittest/mocks/thread-mock.cpp
patch
|
blob
|
history
diff --git
a/tests/unittest/mocks/thread-mock.cpp
b/tests/unittest/mocks/thread-mock.cpp
index
d4e38e9
..
9eb2b74
100644
(file)
--- a/
tests/unittest/mocks/thread-mock.cpp
+++ b/
tests/unittest/mocks/thread-mock.cpp
@@
-18,6
+18,9
@@
int system_info_get_platform_bool(const char *key, bool *value)
{
- *value = true;
- return SYSTEM_INFO_ERROR_NONE;
+ if (value == nullptr)
+ return SYSTEM_INFO_ERROR_INVALID_PARAMETER;
+
+ *value = true;
+ return SYSTEM_INFO_ERROR_NONE;
}
\ No newline at end of file