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-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fe499e879789807b2a60537caba73b6fbc0d237b;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 c3a84b4e4..fc196e63d 100644 --- a/src/descrambler/capmt.c +++ b/src/descrambler/capmt.c @@ -1644,6 +1644,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);