android/client: Fix crash in get_profile_interface
PATCH 1/1 android/client: Fix crash in get_profile_interface
This fixes crash due to uncheck input from user.
--- android/client/if-bt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
android/client/if-bt.c +6 -1
@@ -804,11 +804,16 @@ 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;
Signature · 1 line
1.7.9.5
Hi Jerzy,
Quoted 4 lines · Jerzy Kasenberg
This fixes crash due to uncheck input from user.
--- android/client/if-bt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Applied (after minor coding style fix to add an empty line after }). Thanks.
Johan