From b08b2b54a3a7ae1c45f79d2656a96c26ea73786c Mon Sep 17 00:00:00 2001 From: Stefan Pöschel Date: Mon, 13 Jul 2015 09:14:40 +0200 Subject: PAD: check PAD len --- src/dabplus-enc.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/dabplus-enc.cpp b/src/dabplus-enc.cpp index 7e30a79..76d61fc 100644 --- a/src/dabplus-enc.cpp +++ b/src/dabplus-enc.cpp @@ -464,6 +464,11 @@ int main(int argc, char *argv[]) return 1; } + if (padlen < 0) { + fprintf(stderr, "Invalid PAD length specified\n"); + return 1; + } + zmq::context_t zmq_ctx; zmq::socket_t zmq_sock(zmq_ctx, ZMQ_PUB); -- cgit v1.2.3