From: Jaroslav Kysela Date: Tue, 20 Jun 2017 16:30:23 +0000 (+0200) Subject: capmt: fix the command length calculation X-Git-Tag: v4.2.3~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5519b435c413d115476582d8dc6385c923d8ac8;p=thirdparty%2Ftvheadend.git capmt: fix the command length calculation --- diff --git a/src/descrambler/capmt.c b/src/descrambler/capmt.c index ec9a530f3..7ec5e6ac0 100644 --- a/src/descrambler/capmt.c +++ b/src/descrambler/capmt.c @@ -1164,9 +1164,9 @@ capmt_msg_size(capmt_t *capmt, sbuf_t *sb, int offset) else if (cmd == CA_SET_DESCR) return 4 + 16 + adapter_byte; else if (cmd == CA_SET_DESCR_AES) - return 4 + 32; + return 4 + 32 + adapter_byte; else if (cmd == CA_SET_DESCR_MODE && capmt_oscam_netproto(capmt)) - return 4 + 12; + return 4 + 12 + adapter_byte; else if (oscam_new && cmd == DMX_SET_FILTER) /* when using network protocol the dmx_sct_filter_params fields are added */ /* seperately to avoid padding problems, so we substract 2 bytes: */