Re: [FFmpeg-devel] Check size of STSC allocation

2017-11-16 Thread Michael Niedermayer
On Wed, Nov 15, 2017 at 05:25:47PM -0800, Fredrik Hubinette wrote: > Fixed indentation. > > > On Wed, Nov 15, 2017 at 3:40 PM, Carl Eugen Hoyos > wrote: > > > 2017-11-16 0:21 GMT+01:00 Fredrik Hubinette > org>: > > > This patch checks that the memory allocated for stsc entries isn't larger > >

Re: [FFmpeg-devel] Check size of STSC allocation

2017-11-15 Thread Fredrik Hubinette
Fixed indentation. On Wed, Nov 15, 2017 at 3:40 PM, Carl Eugen Hoyos wrote: > 2017-11-16 0:21 GMT+01:00 Fredrik Hubinette org>: > > This patch checks that the memory allocated for stsc entries isn't larger > > than the atom. > > Consider fixing the indentation of the second added line, > makin

Re: [FFmpeg-devel] Check size of STSC allocation

2017-11-15 Thread Carl Eugen Hoyos
2017-11-16 0:21 GMT+01:00 Fredrik Hubinette : > This patch checks that the memory allocated for stsc entries isn't larger > than the atom. Consider fixing the indentation of the second added line, making the committer's life easier. Thank you, Carl Eugen __

[FFmpeg-devel] Check size of STSC allocation

2017-11-15 Thread Fredrik Hubinette
This patch checks that the memory allocated for stsc entries isn't larger than the atom. Without this, corrupt data can easily try to allocate all the memory, causing a crash. From e79de93ea8426985d63a2369e8274ceaf296ba2d Mon Sep 17 00:00:00 2001 From: Fredrik Hubinette Date: Wed, 15 Nov 2017 15:1

Re: [FFmpeg-devel] check size of stsc allocation

2017-11-13 Thread Carl Eugen Hoyos
2017-11-14 2:08 GMT+01:00 Fredrik Hubinette : > +if (((size_t)entries) * 12 + 4 > atom.size) This gets much more readable if the cast is to uint64_t. And I guess not all the parenthesis are necessary. It seems your mailer has eaten the patch, send it as attachment. Carl Eugen __

[FFmpeg-devel] check size of stsc allocation

2017-11-13 Thread Fredrik Hubinette
This patch checks that the memory allocated for stsc entries isn't larger than the atom. Without this, corrupt data can easily try to allocate all the memory, causing a crash. --- libavformat/mov.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/mov.c b/libavformat/m