diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-03-08 14:08:16 -0800 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-03-08 14:42:04 -0800 |
commit | f3e4937bc6a4fd01e21a5b26d40807c33572e7cb (patch) | |
tree | 904e2dc34a17cbcc6f2882f83aa153dbaf2a5e45 /monitor/packet.c | |
parent | 632bac1ba24b8a7d5354f17cbdb2d52377e9f77c (diff) | |
download | bluez-f3e4937bc6a4fd01e21a5b26d40807c33572e7cb.tar.gz |
monitor: Fix invalid access
ident can be NULL when printing user logs which may lead ot invalid
access.
Fixes: https://github.com/bluez/bluez/issues/92
Diffstat (limited to 'monitor/packet.c')
-rw-r--r-- | monitor/packet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/monitor/packet.c b/monitor/packet.c index a72b424fe..8b87d3d8b 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -11306,7 +11306,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); |