* [PATCH BlueZ] adapter: Fix possible invalid memory access
@ 2012-02-10 21:47 Vinicius Costa Gomes
2012-02-14 12:46 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Vinicius Costa Gomes @ 2012-02-10 21:47 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Vinicius Costa Gomes
---
This possible crash was detected by the clang static analysis tool.
src/adapter.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/adapter.c b/src/adapter.c
index 60477bb..36073ff 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -1906,8 +1906,10 @@ static void create_stored_device_from_ltks(char *key, char *value,
bdaddr_t src;
info = get_ltk_info(key, value);
- if (info)
- keys->keys = g_slist_append(keys->keys, info);
+ if (info == NULL)
+ return;
+
+ keys->keys = g_slist_append(keys->keys, info);
if (g_slist_find_custom(adapter->devices, key,
(GCompareFunc) device_address_cmp))
--
1.7.8.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH BlueZ] adapter: Fix possible invalid memory access
2012-02-10 21:47 [PATCH BlueZ] adapter: Fix possible invalid memory access Vinicius Costa Gomes
@ 2012-02-14 12:46 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2012-02-14 12:46 UTC (permalink / raw)
To: Vinicius Costa Gomes; +Cc: linux-bluetooth
Hi Vinicius,
On Fri, Feb 10, 2012, Vinicius Costa Gomes wrote:
> ---
>
> This possible crash was detected by the clang static analysis tool.
>
> src/adapter.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
Applied. Thanks.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-14 12:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-10 21:47 [PATCH BlueZ] adapter: Fix possible invalid memory access Vinicius Costa Gomes
2012-02-14 12:46 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).