projects
/
platform
/
core
/
system
/
dlog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e64663
)
Fix a potential null ptr dereference
30/213130/2
author
Michal Bloch
<m.bloch@samsung.com>
Fri, 30 Aug 2019 12:03:47 +0000
(14:03 +0200)
committer
Hyotaek Shim
<hyotaek.shim@samsung.com>
Tue, 3 Sep 2019 01:12:02 +0000
(
01:12
+0000)
Change-Id: I5541047d606dea988b5ce5b54cb7394a3aba78ac
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
src/shared/logprint.c
patch
|
blob
|
history
diff --git
a/src/shared/logprint.c
b/src/shared/logprint.c
index
ef94ce6
..
6328cc1
100644
(file)
--- a/
src/shared/logprint.c
+++ b/
src/shared/logprint.c
@@
-757,6
+757,8
@@
char *log_format_json(
#else
ptm = localtime(&time_t_temp);
#endif
+ if (!ptm)
+ return NULL;
strftime(recv_real, sizeof recv_real, "\"recv_real\":\"%FT%T%z\",", ptm);
}
@@
-769,6
+771,8
@@
char *log_format_json(
#else
ptm = localtime(&time_t_temp);
#endif
+ if (!ptm)
+ return NULL;
strftime(sent_real, sizeof sent_real, "\"sent_real\":\"%FT%T%z\",", ptm);
}