[FFmpeg-devel] [PATCH] avformat/apetag: tag values are unsigned

Michael Niedermayer michael at niedermayer.cc
Fri Apr 19 18:13:26 EEST 2019


On Thu, Apr 18, 2019 at 05:12:14PM -0700, Dan Sanders via ffmpeg-devel wrote:
> Fixes: UBSan runtime error
> Found-by: Clusterfuzz
> ---
>  libavformat/apetag.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/libavformat/apetag.c b/libavformat/apetag.c
> index cdc602e1a9..2991f57d5d 100644
> --- a/libavformat/apetag.c
> +++ b/libavformat/apetag.c
> @@ -29,10 +29,10 @@
>  #include "apetag.h"
>  #include "internal.h"
> 
> -#define APE_TAG_FLAG_CONTAINS_HEADER  (1 << 31)
> -#define APE_TAG_FLAG_LACKS_FOOTER     (1 << 30)
> -#define APE_TAG_FLAG_IS_HEADER        (1 << 29)
> -#define APE_TAG_FLAG_IS_BINARY        (1 << 1)
> +#define APE_TAG_FLAG_CONTAINS_HEADER  (1U << 31)
> +#define APE_TAG_FLAG_LACKS_FOOTER     (1U << 30)
> +#define APE_TAG_FLAG_IS_HEADER        (1U << 29)
> +#define APE_TAG_FLAG_IS_BINARY        (1U << 1)

LGTM (both with all changed as in the patch or just one changed)

whoever pushes please fix the Author/FROM
(not pushing myself as theres a discussion about changing only 1 #define)

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190419/85099b9f/attachment.sig>


More information about the ffmpeg-devel mailing list