diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2014-12-20 18:39:51 +0100 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2014-12-20 18:35:45 +0000 |
commit | 851909d2c8e54ba8d087d68cc977a90bea4e0fd0 (patch) | |
tree | a8d982552e81f9fca99f8891dfee9406260bde0d /epan/dissectors/packet-infiniband_sdp.c | |
parent | 326e4964e516b545107b5c3aebaa309b6ddb4e1f (diff) |
FCoIB / Infiniband SDP: prevent a crash when 'enable manual settings' is set without filling address field
Bug: 10796
Change-Id: Ifdb7804ec5e1146b08f00e54647d802a69d52113
Reviewed-on: https://code.wireshark.org/review/5914
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-infiniband_sdp.c')
-rw-r--r-- | epan/dissectors/packet-infiniband_sdp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/dissectors/packet-infiniband_sdp.c b/epan/dissectors/packet-infiniband_sdp.c index 9121294047..f847102db4 100644 --- a/epan/dissectors/packet-infiniband_sdp.c +++ b/epan/dissectors/packet-infiniband_sdp.c @@ -532,7 +532,9 @@ proto_reg_handoff_ib_sdp(void) int i; for (i = 0; i < 2; i++) { - if (gPREF_TYPE[i] == 0) { /* LID */ + if (gPREF_ID[i][0] == '\0') { + error_occured = TRUE; + } else if (gPREF_TYPE[i] == 0) { /* LID */ errno = 0; /* reset any previous error indicators */ *((guint16*)manual_addr_data[i]) = (guint16)strtoul(gPREF_ID[i], ¬_parsed, 0); if (errno || *not_parsed != '\0') { |