forked from osmocom/wireshark
Coverity's run 14 CID 82.
an off by one error (> vs >= in bounds check). svn path=/trunk/; revision=17520
This commit is contained in:
parent
8284947d84
commit
3fa91ab7be
|
@ -354,8 +354,8 @@ int network_instruments_dump_can_write_encap(int encap)
|
|||
/* Per-packet encapsulations aren't supported. */
|
||||
if (encap == WTAP_ENCAP_PER_PACKET)
|
||||
return WTAP_ERR_ENCAP_PER_PACKET_UNSUPPORTED;
|
||||
|
||||
if (encap < 0 || (unsigned) encap > NUM_FROM_WTAP_ENCAPS || from_wtap_encap[encap] == OBSERVER_UNDEFINED)
|
||||
|
||||
if (encap < 0 || (unsigned) encap >= NUM_FROM_WTAP_ENCAPS || from_wtap_encap[encap] == OBSERVER_UNDEFINED)
|
||||
return WTAP_ERR_UNSUPPORTED_ENCAP;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue