View | Details | Raw Unified
Collapse All | Expand All

(-) 2.6.1.1-orig/src/decode.c (-4 / +10 lines)
 Lines 2346-2352    Link Here 
     * since p->iph will be pointing to this inner IP
     * since p->iph will be pointing to this inner IP
     */
     */
    if (p->greh != NULL)
    if (p->greh != NULL)
    {
        p->ip_options_data = NULL;
        p->ip_options_data = NULL;
        p->ip_options_len = 0;
        memset(&(p->ip_options[0]), 0, sizeof(p->ip_options));
        p->ip_lastopt_bad = 0;
    }
#endif
#endif
        p->ip_option_count = 0;
        p->ip_option_count = 0;
 Lines 2642-2648    Link Here 
    u_int16_t uhlen;
    u_int16_t uhlen;
    struct pseudoheader ph;
    struct pseudoheader ph;
    if(len < sizeof(UDPHdr))
    if(len < GRE_HEADER_LEN)
    {
    {
        if(pv.verbose_flag)
        if(pv.verbose_flag)
        {
        {
 Lines 3566-3574    Link Here 
        }
        }
    }
    }
    payload_len = len - hlen;
    if (hlen > len)
    if (payload_len < 0)
    {
    {
        if(pv.verbose_flag)
        if(pv.verbose_flag)
            ErrorMessage("GRE header length > rest of packet length");
            ErrorMessage("GRE header length > rest of packet length");
 Lines 3589-3594    Link Here 
        return;
        return;
    }
    }
    payload_len = len - hlen;
    /* send to next protocol decoder */
    /* send to next protocol decoder */
    /* As described in RFC 2784 the possible protocols are listed in
    /* As described in RFC 2784 the possible protocols are listed in
     * RFC 1700 under "ETHER TYPES"
     * RFC 1700 under "ETHER TYPES"