On 2016-01-26 at 00:11:45 +0100, Vadim Kochan <vadi...@gmail.com> wrote:
[...]
> +void proto_header_init(enum proto_id pid)
> +{
> +     struct proto_hdr *hdr = proto_header_by_id(pid);
> +     struct proto_hdr *new;
> +
> +     if (headers_count >= PROTO_MAX_LAYERS)
> +             panic("Too much proto headers\n");
> +
> +     new = malloc(sizeof(*new));

Use xmalloc here, as we would otherwise dereference NULL.

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netsniff-ng+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to