summaryrefslogtreecommitdiff
path: root/extcap/androiddump.c
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2016-01-21 09:23:42 +0100
committerMichael Mann <mmann78@netscape.net>2016-02-05 18:57:29 +0000
commitc09d894f7446aa394d04710876ed631af22b1497 (patch)
treedd17ff934afd6f386f8149d4869c6209bf60174b /extcap/androiddump.c
parentfb033d0f39eda3f3937ae265c422ad907b179f42 (diff)
downloadwireshark-c09d894f7446aa394d04710876ed631af22b1497.tar.gz
Fix some Coverity issue
>>> CID 1349726: Incorrect expression (COPY_PASTE_ERROR) >>> "tvb_reported_length_remaining" in "tvb_reported_length_remaining(tvb, offset)" looks like a copy-paste error. >>> CID 1349727: Incorrect expression (COPY_PASTE_ERROR) >>> "tree" in "dissector_try_uint_new(bluetooth_eir_ad_manufacturer_company_id, company_id, new_tvb, pinfo, >>> CID 1349728: (DEADCODE) >>> Execution cannot reach this expression "0" inside statement "(0 && ((__s1_len = __builti...". >>> CID 1306904: Logically dead code (DEADCODE) >>> Execution cannot reach this statement "tap_hci_summary->interface_...". Change-Id: I5f99e37e6d5fac39da7082649caa8373d06bb808 Reviewed-on: https://code.wireshark.org/review/13739 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'extcap/androiddump.c')
-rw-r--r--extcap/androiddump.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/extcap/androiddump.c b/extcap/androiddump.c
index 5e8eab9c42..92778fb30d 100644
--- a/extcap/androiddump.c
+++ b/extcap/androiddump.c
@@ -752,6 +752,7 @@ static int list_interfaces(const char *adb_server_ip, unsigned short *adb_server
char *data_str;
char pid[16];
+ memset(pid, 0, sizeof(pid));
response[data_length] = '\0';
data_str = strchr(response, '\n');
@@ -828,6 +829,7 @@ static int list_interfaces(const char *adb_server_ip, unsigned short *adb_server
char *data_str;
char pid[16];
+ memset(pid, 0, sizeof(pid));
response[data_length] = '\0';
data_str = strchr(response, '\n');
@@ -2377,6 +2379,8 @@ static int capture_android_wifi_tcpdump(char *interface, char *fifo,
}
}
}
+
+ closesocket(sock);
return 0;
}