From: Jaroslav Kysela Date: Wed, 14 Jun 2017 06:03:21 +0000 (+0200) Subject: capmt: add protection for out-of-valid-data access, fixes #4430 X-Git-Tag: v4.2.3~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d69f048dd345607d1bd823efd60fd7b052a9844c;p=thirdparty%2Ftvheadend.git capmt: add protection for out-of-valid-data access, fixes #4430 --- diff --git a/src/descrambler/capmt.c b/src/descrambler/capmt.c index 4e89fd8a8..ec9a530f3 100644 --- a/src/descrambler/capmt.c +++ b/src/descrambler/capmt.c @@ -1559,6 +1559,8 @@ handle_single(capmt_t *capmt) offset = 0; cmd_size = 0; cmd = 0; + if (buffer.sb_ptr < 5) + break; if (netproto) { buffer.sb_bswap = 1; cmd_size = capmt_msg_size(capmt, &buffer, 0);