Changeset d8fc342


Ignore:
Timestamp:
04/11/06 16:48:35 (15 years ago)
Author:
Perry Lorier <perry@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
6b0560b
Parents:
9e46ee7
Message:

Don't segfault if you ask for a port on something which has no transport
header

Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/dagformat.h

    r23971d0 rd8fc342  
    11#ifndef _DAGFORMAT_H_
    22#define _DAGFORMAT_H_
     3
     4#include "libtrace.h"
    35
    46/* GPP record type defines */
  • lib/protocols.c

    r9e46ee7 rd8fc342  
    479479                        NULL, NULL);
    480480
    481         return ntohs(port->src);
     481        if (port)
     482                return ntohs(port->src);
     483        else
     484                return 0;
    482485}
    483486
     
    489492                        NULL, NULL);
    490493
    491         return ntohs(port->dst);
     494        if (port)
     495                return ntohs(port->dst);
     496        else
     497                return 0;
    492498}
    493499
Note: See TracChangeset for help on using the changeset viewer.