mlz: limit next_code to data buffer size
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Mon, 14 Nov 2016 23:11:30 +0000 (00:11 +0100)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Thu, 17 Nov 2016 22:18:42 +0000 (23:18 +0100)
commita2c7840a6b69671adec490cac375f51e09a654b4
tree3328ad94d52be879aa1310c82e59efe3c945c8b9
parentc8f5154fc1ca0f19ccb980a612e2e6f68af6e495
mlz: limit next_code to data buffer size

This fixes a heap-buffer-overflow detected by AddressSanitizer.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 1abcd972c4c0e16f1e83be2fd32a251f51b2946d)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavcodec/mlz.c