projects
/
platform
/
kernel
/
linux-tizen-modules-source.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
681b638
)
Fix a null dereference issue
61/308561/2
author
Michal Bloch
<m.bloch@samsung.com>
Wed, 27 Mar 2024 11:12:05 +0000
(12:12 +0100)
committer
Michal Bloch
<m.bloch@samsung.com>
Tue, 2 Apr 2024 16:44:39 +0000
(18:44 +0200)
Change-Id: I50fe239a1590740e8c15a6a1499baf894c7cbdd9
tests/logger/logger.c
patch
|
blob
|
history
diff --git
a/tests/logger/logger.c
b/tests/logger/logger.c
index b7c7b72b785d9234ecce56c3f1ddede47468fa11..d2c4231e0c60f3db9757c3da39d475e0793629fc 100644
(file)
--- a/
tests/logger/logger.c
+++ b/
tests/logger/logger.c
@@
-285,12
+285,20
@@
int main(int ac, char *av[]) {
break;
case 't':
tag = strdup(optarg);
+ if (!tag) {
+ fprintf(stderr, "not enough memory!\n");
+ exit(EXIT_FAILURE);
+ }
break;
case 'm':
test_mask = (unsigned long) strtol(optarg, NULL, 16);
break;
case 'd':
device = strdup(optarg);
+ if (!device) {
+ fprintf(stderr, "not enough memory!\n");
+ exit(EXIT_FAILURE);
+ }
break;
case 'D':
dump = true;