[FFmpeg-devel] [PATCH] avcodec/mlz: simplify
Michael Niedermayer
michael at niedermayer.cc
Sat Jul 1 15:14:44 EEST 2017
On Sat, Jul 01, 2017 at 12:05:52PM +0200, Paul B Mahol wrote:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
> libavcodec/mlz.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/libavcodec/mlz.c b/libavcodec/mlz.c
> index ebce796..715ea5c 100644
> --- a/libavcodec/mlz.c
> +++ b/libavcodec/mlz.c
> @@ -112,12 +112,7 @@ static int decode_string(MLZ* mlz, unsigned char *buff, int string_code, int *fi
> }
>
> static int input_code(GetBitContext* gb, int len) {
> - int tmp_code = 0;
> - int i;
> - for (i = 0; i < len; ++i) {
> - tmp_code |= get_bits1(gb) << i;
> - }
> - return tmp_code;
> + return get_bitsz(gb, len);
have you tested this ? (seems not triggered in fate, i ve only found
fuzzed samples that trigger this with len >= 1 quickly)
isnt this the opposite endianness ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Does the universe only have a finite lifespan? No, its going to go on
forever, its just that you wont like living in it. -- Hiranya Peiri
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170701/3a7c5d25/attachment.sig>
More information about the ffmpeg-devel
mailing list