Ignore:
Timestamp:
11/29/18 10:12:59 (2 years ago)
Author:
Jacob Van Walraven <jcv9@…>
Branches:
develop
Children:
fdf23b8
Parents:
d74ca03
Message:

Apply changes required for pull request #81

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_legacy.c

    r25a3255 r2193905  
    3434
    3535#include <sys/stat.h>
    36 #include <assert.h>
    3736#include <errno.h>
    3837#include <fcntl.h>
     
    258257                        break;
    259258                default:
    260                         /*assert(0);*/
    261259                        trace_set_err(libtrace, TRACE_ERR_BAD_FORMAT, "Invalid trace format type in legacy_read_packet()");
    262260                        return -1;
     
    394392static int legacypos_get_wire_length(const libtrace_packet_t *packet) {
    395393        legacy_pos_t *lpos = (legacy_pos_t *)packet->header;
    396         /*assert(ntohl(lpos->wlen)>0);*/
     394
    397395        if (ntohl(lpos->wlen) <= 0) {
    398                 trace_set_err(packet->trace, TRACE_ERR_BAD_PACKET, "Packet wire length is less than 0 in legacypos_get_wire_length()");
     396                trace_set_err(packet->trace, TRACE_ERR_BAD_PACKET, "Packet wire length is invalid (%d) "
     397                        "in legacypos_get_wire_length()", ntohl(lpos->wlen));
    399398                return -1;
    400399        }
Note: See TracChangeset for help on using the changeset viewer.