projects
/
platform
/
core
/
connectivity
/
bluetooth-agent.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix NULL dereference issue and uninitialized variable issue
[platform/core/connectivity/bluetooth-agent.git]
/
map-agent
/
bluetooth_map_agent.c
diff --git
a/map-agent/bluetooth_map_agent.c
b/map-agent/bluetooth_map_agent.c
index
5f59b9f
..
df0a86f
100644
(file)
--- a/
map-agent/bluetooth_map_agent.c
+++ b/
map-agent/bluetooth_map_agent.c
@@
-602,6
+602,9
@@
time_t _get_time_t_from_timestamp(char *timestamp)
ymd = strtol(timestamp, &ptr, 10);
hms = strtol(ptr + 1, &ptr2, 10);
+ /* Initialize local_time */
+ memset(&local_time, 0, sizeof(struct tm));
+
/* parse year, month, day */
local_time.tm_mday = ymd % 100;
ymd = (ymd - local_time.tm_mday) / 100;