git.samba.org
/
metze
/
wireshark
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
148e4f7
)
eap: check scanf return value (CID 1373396).
author
Dario Lombardo
<lomato@gmail.com>
Wed, 28 Sep 2016 11:59:52 +0000
(13:59 +0200)
committer
Dario Lombardo
<lomato@gmail.com>
Wed, 28 Sep 2016 13:17:36 +0000
(13:17 +0000)
Change-Id: I4b602110fc3959dd7214fe15e9c37e3870794c1d
Reviewed-on: https://code.wireshark.org/review/17967
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
epan/dissectors/packet-eap.c
patch
|
blob
|
history
diff --git
a/epan/dissectors/packet-eap.c
b/epan/dissectors/packet-eap.c
index 9e15501ce8ce02295fae532b8f50a9a7e0d78737..82b2838337f76491282a44077887c9a6fe2e5f68 100644
(file)
--- a/
epan/dissectors/packet-eap.c
+++ b/
epan/dissectors/packet-eap.c
@@
-594,8
+594,10
@@
dissect_eap_identity_wlan(tvbuff_t *tvb, packet_info* pinfo, proto_tree* tree, i
dissect_e212_utf8_imsi(tvb, pinfo, eap_identity_tree, offset + 1, (guint)strlen(tokens[0]) - 1);
/* guess if we have a 3 bytes mnc by comparing the first bytes with the imsi */
- sscanf(tokens[2] + 3, "%u", &mnc);
- sscanf(tokens[3] + 3, "%u", &mcc);
+ if (!sscanf(tokens[2] + 3, "%u", &mnc) || !sscanf(tokens[3] + 3, "%u", &mcc)) {
+ ret = FALSE;
+ goto end;
+ }
if (!g_ascii_strncasecmp(tokens[0], tokens[2] + 3, 3)) {
mcc_mnc = 1000 * mcc + mnc;