Changeset 1354 for trunk/lib/protocols_l3.c
- Timestamp:
- 05/29/08 11:44:54 (5 years ago)
- File:
-
- 1 edited
-
trunk/lib/protocols_l3.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/protocols_l3.c
r1315 r1354 17 17 18 18 /* Make sure we have at least a base IPv4 header */ 19 if (remaining < sizeof(libtrace_ip_t)) 19 if (remaining < sizeof(libtrace_ip_t)) 20 20 return NULL; 21 21 … … 50 50 51 51 if ((ntohs(ipptr->ip_off) & SW_IP_OFFMASK) != 0) { 52 *remaining = 0; /* Not sure if this is right but 53 consistency is a good thing, right? 54 */ 52 55 return NULL; 53 56 } … … 55 58 if (remaining) { 56 59 if (*remaining<=(ipptr->ip_hl*4U)) { 60 *remaining = 0; 57 61 return NULL; 58 62 } … … 74 78 75 79 if (remaining) { 76 if (*remaining<sizeof(libtrace_ip6_t)) 77 return NULL; 80 if (*remaining<sizeof(libtrace_ip6_t)) { 81 *remaining = 0; 82 return NULL; 83 } 78 84 *remaining-=sizeof(libtrace_ip6_t); 79 85 } … … 94 100 if (*remaining < len) { 95 101 /* Snap too short */ 102 *remaining = 0; 96 103 return NULL; 97 104 }
Note: See TracChangeset
for help on using the changeset viewer.
