Changeset 11313 in vbox for trunk/src/VBox/Runtime/common/checksum
- Timestamp:
- Aug 9, 2008 7:17:34 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 34408
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/checksum/ipv4.cpp
r11060 r11313 106 106 if (RT_UNLIKELY(pIpHdr->ip_hl * 4 < RTNETIPV4_MIN_LEN)) 107 107 return false; 108 if (RT_UNLIKELY( pIpHdr->ip_hl * 4 > cbHdrMax))108 if (RT_UNLIKELY((size_t)pIpHdr->ip_hl * 4 > cbHdrMax)) 109 109 { 110 110 Assert(pIpHdr->ip_hl * 4 > cbPktMax); /* You'll hit this if you mapped/copy too little of the header! */ … … 412 412 if (RT_UNLIKELY(cb > cbPktMax)) 413 413 return false; 414 if (RT_UNLIKELY(cb > RT_BE2H_U16(pIpHdr->ip_len) - pIpHdr->ip_hl * 4))414 if (RT_UNLIKELY(cb > (size_t)(RT_BE2H_U16(pIpHdr->ip_len) - pIpHdr->ip_hl * 4))) 415 415 return false; 416 416 return true;
Note:
See TracChangeset
for help on using the changeset viewer.