From ce25f2c7327b2257e14b8f92c69e19d92ebcef7d Mon Sep 17 00:00:00 2001 From: Stefan Pöschel Date: Mon, 7 Aug 2017 23:06:20 +0200 Subject: MP2: fix PAD with only F-PAD When the PAD contains only F-PAD (and no X-PAD), this lead to a crash in the MP2 encoder. --- libtoolame-dab/toolame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libtoolame-dab') diff --git a/libtoolame-dab/toolame.c b/libtoolame-dab/toolame.c index b8a7afb..4e0c7d8 100644 --- a/libtoolame-dab/toolame.c +++ b/libtoolame-dab/toolame.c @@ -522,7 +522,7 @@ int toolame_encode_frame( if (xpad_len) { - assert(xpad_len > 2); + assert(xpad_len >= FPAD_LENGTH); // insert available X-PAD for (int i = header.dab_length - xpad_len; -- cgit v1.2.3