projects
/
platform
/
upstream
/
bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d5431e1
)
monitor: Fix invalid access
author
Luiz Augusto von Dentz
<luiz.von.dentz@intel.com>
Mon, 8 Mar 2021 22:08:16 +0000
(14:08 -0800)
committer
Ayush Garg
<ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:34 +0000
(19:08 +0530)
ident can be NULL when printing user logs which may lead ot invalid
access.
Fixes: https://github.com/bluez/bluez/issues/92
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
monitor/packet.c
patch
|
blob
|
history
diff --git
a/monitor/packet.c
b/monitor/packet.c
index
ff35db0
..
9106c03
100755
(executable)
--- a/
monitor/packet.c
+++ b/
monitor/packet.c
@@
-11312,7
+11312,7
@@
void packet_user_logging(struct timeval *tv, struct ucred *cred,
label = "Message";
}
- if (ident
[0] == '<' || ident[0] == '>'
) {
+ if (ident
&& (ident[0] == '<' || ident[0] == '>')
) {
packet_decode(tv, cred, ident[0], index, color,
label == ident ? &ident[2] : label,
data, size);