[FFmpeg-devel] [PATCH 2/2] g2meet: factor out chunk seeking

Michael Niedermayer michaelni at gmx.at
Sat Feb 8 22:45:45 CET 2014


On Sat, Feb 08, 2014 at 10:27:51PM +0100, Maxim Poliakovski wrote:
> This version requires fewer code and is safer.
> ---
>  libavcodec/g2meet.c |   21 ++++++++-------------
>  1 file changed, 8 insertions(+), 13 deletions(-)
> 
> diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c
> index b982eab..c2fceda 100644
> --- a/libavcodec/g2meet.c
> +++ b/libavcodec/g2meet.c
> @@ -646,7 +646,7 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
>      int magic;
>      int got_header = 0;
>      uint32_t chunk_size;
> -    int chunk_type;
> +    int chunk_type, chunk_start;

chunk_start should be 64bit as file positions could be 64bit in theory
also chunk_start + chunk_size could overflow if they are both 32bit

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140208/25218121/attachment.asc>


More information about the ffmpeg-devel mailing list