Re: [FFmpeg-devel] [PATCH] avcodec/ttaenc: Fix undefined shift

2019-09-16 Thread Michael Niedermayer
On Mon, Sep 16, 2019 at 10:16:36AM +0200, Paul B Mahol wrote: > LGTM will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety -- Benjamin

Re: [FFmpeg-devel] [PATCH] avcodec/ttaenc: Fix undefined shift

2019-09-16 Thread Paul B Mahol
LGTM On 9/15/19, Andreas Rheinhardt wrote: > ttaenc contained (1 << unary) - 1 as an argument for a function > expecting an unsigned int. unary can be as big as 31 in this case. > The type of the shift and the whole expression is int, because 1 fits > into an integer, so that the behaviour is und

[FFmpeg-devel] [PATCH] avcodec/ttaenc: Fix undefined shift

2019-09-15 Thread Andreas Rheinhardt
ttaenc contained (1 << unary) - 1 as an argument for a function expecting an unsigned int. unary can be as big as 31 in this case. The type of the shift and the whole expression is int, because 1 fits into an integer, so that the behaviour is undefined if unary == 31 as the result of the shift can'