win-pvdrivers

changeset 953:cc8651af4e45

Fix header length calculation properly
author James Harper <james.harper@bendigoit.com.au>
date Thu Nov 10 21:04:53 2011 +1100 (2011-11-10)
parents 58ad7893b3be
children da0e40d12a9c
files xennet/xennet6_common.c
line diff
     1.1 --- a/xennet/xennet6_common.c	Thu Nov 10 21:03:53 2011 +1100
     1.2 +++ b/xennet/xennet6_common.c	Thu Nov 10 21:04:53 2011 +1100
     1.3 @@ -31,6 +31,11 @@ XenNet_BuildHeader(packet_info_t *pi, PU
     1.4    if (!header)
     1.5      header = pi->header;
     1.6  
     1.7 +  if (new_header_size > pi->total_length)
     1.8 +  {
     1.9 +    new_header_size = pi->total_length;
    1.10 +  }
    1.11 +
    1.12    if (new_header_size <= pi->header_length)
    1.13    {
    1.14      //FUNCTION_EXIT();