From: Nagaraj D R <nagaraj.dr@samsung.com>
To: linux-bluetooth@vger.kernel.org
Cc: Syam Sidhardhan <s.syam@samsung.com>,
Nagaraj D R <nagaraj.dr@samsung.com>
Subject: [PATCH] Fix possible invalid memory access
Date: Fri, 18 May 2018 09:28:16 +0530 [thread overview]
Message-ID: <1526615896-23631-1-git-send-email-nagaraj.dr@samsung.com> (raw)
In-Reply-To: CGME20180518035824epcas2p356c2382c482a8fcdd0598816d4dee070@epcas2p3.samsung.com
Uninitialized data is read from local variable 'addr'
---
client/main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/client/main.c b/client/main.c
index 54bd537..73e77c4 100644
--- a/client/main.c
+++ b/client/main.c
@@ -1774,12 +1774,12 @@ static void cmd_disconn(int argc, char *argv[])
if (argc < 2 || strlen(argv[1]) == 0) {
DBusMessageIter iter;
- const char *addr;
- if (g_dbus_proxy_get_property(proxy, "Address", &iter) == TRUE)
+ if (g_dbus_proxy_get_property(proxy, "Address", &iter) == TRUE) {
+ const char *addr;
dbus_message_iter_get_basic(&iter, &addr);
-
- bt_shell_printf("Attempting to disconnect from %s\n", addr);
+ bt_shell_printf("Attempting to disconnect from %s\n", addr);
+ }
} else
bt_shell_printf("Attempting to disconnect from %s\n", argv[1]);
}
--
1.9.1
next parent reply other threads:[~2018-05-18 3:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180518035824epcas2p356c2382c482a8fcdd0598816d4dee070@epcas2p3.samsung.com>
2018-05-18 3:58 ` Nagaraj D R [this message]
2018-05-21 8:37 ` [PATCH] Fix possible invalid memory access Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1526615896-23631-1-git-send-email-nagaraj.dr@samsung.com \
--to=nagaraj.dr@samsung.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=s.syam@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).