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>
This commit is contained in:
parent
326e4964e5
commit
851909d2c8
|
@ -431,7 +431,9 @@ proto_reg_handoff_fcoib(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') {
|
||||
|
|
|
@ -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') {
|
||||
|
|
Loading…
Reference in New Issue