OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4287642
)
android/client: Fix crash in get_profile_interface
author
Jerzy Kasenberg
<jerzy.kasenberg@tieto.com>
Thu, 31 Oct 2013 10:56:26 +0000
(11:56 +0100)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Thu, 31 Oct 2013 11:51:59 +0000
(13:51 +0200)
This fixes crash due to uncheck input from user.
android/client/if-bt.c
patch
|
blob
|
history
diff --git
a/android/client/if-bt.c
b/android/client/if-bt.c
index
680738e
..
16bd882
100644
(file)
--- a/
android/client/if-bt.c
+++ b/
android/client/if-bt.c
@@
-804,11
+804,17
@@
static void get_profile_interface_c(int argc, const char **argv,
static void get_profile_interface_p(int argc, const char **argv)
{
- const char *id
= argv[2]
;
+ const char *id;
const void **pif = NULL;
const void *dummy = NULL;
RETURN_IF_NULL(if_bluetooth);
+ if (argc <= 2) {
+ haltest_error("No interface specified\n");
+ return;
+ }
+
+ id = argv[2];
if (strcmp(BT_PROFILE_HANDSFREE_ID, id) == 0)
pif = (const void **) &if_hf;