Androiddump: fix Null pointer passed as an argument to a 'nonnull' parameter

Change-Id: I8fbcac112d0b60e0129ce0fc17a5e0ffab02710f
Reviewed-on: https://code.wireshark.org/review/8589
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
This commit is contained in:
Alexis La Goutte 2015-05-22 17:35:20 +02:00
parent 187e8f61dc
commit abfd44571c
1 changed files with 12 additions and 0 deletions

View File

@ -2221,6 +2221,10 @@ int main(int argc, char **argv) {
break;
case OPT_CONFIG_ADB_SERVER_TCP_PORT:
adb_server_tcp_port = &local_adb_server_tcp_port;
if (!optarg){
g_printerr("ERROR: Impossible exception. Parameter required argument, but there is no it right now.");
return -1;
}
*adb_server_tcp_port = (unsigned short) strtoul(optarg, NULL, 10);
break;
case OPT_CONFIG_LOGCAT_TEXT:
@ -2228,6 +2232,10 @@ int main(int argc, char **argv) {
break;
case OPT_CONFIG_BT_SERVER_TCP_PORT:
bt_server_tcp_port = &local_bt_server_tcp_port;
if (!optarg){
g_printerr("ERROR: Impossible exception. Parameter required argument, but there is no it right now.");
return -1;
}
*bt_server_tcp_port = (unsigned short) strtoul(optarg, NULL, 10);
break;
case OPT_CONFIG_BT_FORWARD_SOCKET:
@ -2238,6 +2246,10 @@ int main(int argc, char **argv) {
break;
case OPT_CONFIG_BT_LOCAL_TCP_PORT:
bt_local_tcp_port = &local_bt_local_tcp_port;
if (!optarg){
g_printerr("ERROR: Impossible exception. Parameter required argument, but there is no it right now.");
return -1;
}
*bt_local_tcp_port = (unsigned short) strtoul(optarg, NULL, 10);
break;
default: