[Ffmpeg-devel] [PATCH] aiff/aiff-c format encoder and decoder

Michael Niedermayer michaelni
Sun Jan 29 20:28:06 CET 2006


Hi

On Sun, Jan 29, 2006 at 01:45:25PM -0500, Patrick Guimond wrote:
[...]
> +/* Metadata string read */
> +static void get_meta(ByteIOContext *pb, char * str, int size)
> +{
> +    int res;
> +
> +    if (size > 511)
> +        res = get_buffer(pb, (uint8_t*)str, 511);
> +    else
> +        res = get_buffer(pb, (uint8_t*)str, size);

IMHO the 511 should be passed as argument and be from a sizeof to ensure no
security bugs in case it ever decreases


[...]
> diff -uNrp ../ffmpeg-orig/libavformat/aviobuf.c ./libavformat/aviobuf.c
> --- ../ffmpeg-orig/libavformat/aviobuf.c	2006-01-29 13:23:41.000000000 -0500
> +++ ./libavformat/aviobuf.c	2006-01-29 13:31:02.000000000 -0500
> @@ -251,6 +251,37 @@ void put_tag(ByteIOContext *s, const cha
>          put_byte(s, *tag++);
>      }
>  }
> +
> +void put_be754_80(ByteIOContext *s, double val)
[...]
> +double get_be754_80(ByteIOContext *s)

these 2 dont belong in here, they should be in libavutil/intfloat_readwrite.*
and also match the API for the float & double cases


[...]

-- 
Michael





More information about the ffmpeg-devel mailing list