Ignore:
Timestamp:
11/29/18 13:37:55 (3 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
develop
Children:
99ee456
Parents:
54642da (diff), d7d3267 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'jacobvw-master' into develop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_etsilive.c

    rd24b1df rd7d3267  
    3737#include <libwandder_etsili.h>
    3838
    39 #include <assert.h>
    4039#include <errno.h>
    4140#include <fcntl.h>
     
    215214                        sizeof(etsilive_format_data_t));
    216215
     216        if (!libtrace->format) {
     217                trace_set_err(libtrace, TRACE_ERR_INIT_FAILED, "Unable to allocate memory for "
     218                        "format data inside etsilive_init_input()");
     219                return 1;
     220        }
     221
    217222        FORMAT_DATA->receivers = NULL;
    218223        FORMAT_DATA->nextthreadid = 0;
     
    621626        libtrace_t *libtrace = packet->trace;
    622627
    623         assert(libtrace);
    624         assert(FORMAT_DATA->shareddec);
     628        if (!libtrace) {
     629                fprintf(stderr, "Packet is not associated with a trace in etsilive_get_pdu_length()\n");
     630                return TRACE_ERR_NULL_TRACE;
     631        }
     632        if (!FORMAT_DATA->shareddec) {
     633                trace_set_err(libtrace, TRACE_ERR_BAD_FORMAT, "Etsilive format data shareddec is NULL in etsilive_get_pdu_length()\n");
     634                return -1;
     635        }
    625636
    626637        /* 0 should be ok here for quickly evaluating the first length
Note: See TracChangeset for help on using the changeset viewer.