Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-29 Thread Andreas Cadhalpun
On 29.01.2017 04:02, Marton Balint wrote: > > On Sun, 29 Jan 2017, Andreas Cadhalpun wrote: > >> On 28.01.2017 12:44, Marton Balint wrote: >>> If we reduce the number of extra lines (not at any cost), I think that >>> helps. >>> There is also a solution which keeps the traditional C syntax, and

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-28 Thread Marton Balint
On Sun, 29 Jan 2017, Andreas Cadhalpun wrote: On 28.01.2017 12:44, Marton Balint wrote: If we reduce the number of extra lines (not at any cost), I think that helps. There is also a solution which keeps the traditional C syntax, and is easy to undestand even at first glance. if (st->codecpar

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-28 Thread Andreas Cadhalpun
On 29.01.2017 00:26, Paul B Mahol wrote: > On 1/29/17, Andreas Cadhalpun wrote: >> On 28.01.2017 12:44, Marton Balint wrote: >>> If we reduce the number of extra lines (not at any cost), I think that >>> helps. >>> There is also a solution which keeps the traditional C syntax, and is easy >>> to u

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-28 Thread Paul B Mahol
On 1/29/17, Andreas Cadhalpun wrote: > On 28.01.2017 12:44, Marton Balint wrote: >> If we reduce the number of extra lines (not at any cost), I think that >> helps. >> There is also a solution which keeps the traditional C syntax, and is easy >> to undestand even at first glance. >> >> if (st->cod

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-28 Thread Andreas Cadhalpun
On 28.01.2017 12:44, Marton Balint wrote: > If we reduce the number of extra lines (not at any cost), I think that helps. > There is also a solution which keeps the traditional C syntax, and is easy to > undestand even at first glance. > > if (st->codecpar->channels > FF_SANE_NB_CHANNELS) > r

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-28 Thread Andreas Cadhalpun
On 28.01.2017 03:48, Ronald S. Bultje wrote: > I agree a macro here doesn't help. My concern wasn't with the check itself, > I agree a file with 100 channels should error out. My concern is that these > files will universally be the result of fuzzing, so I don't want to spam > stderr with messages

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-28 Thread Paul B Mahol
On 1/28/17, Michael Niedermayer wrote: > On Fri, Jan 27, 2017 at 09:48:05PM -0500, Ronald S. Bultje wrote: >> Hi, >> >> On Fri, Jan 27, 2017 at 9:28 PM, Michael Niedermayer >> wrote: >> >> > On Sat, Jan 28, 2017 at 01:26:40AM +0100, Andreas Cadhalpun wrote: >> > > On 27.01.2017 02:56, Marton Bali

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-28 Thread Michael Niedermayer
On Fri, Jan 27, 2017 at 09:48:05PM -0500, Ronald S. Bultje wrote: > Hi, > > On Fri, Jan 27, 2017 at 9:28 PM, Michael Niedermayer > wrote: > > > On Sat, Jan 28, 2017 at 01:26:40AM +0100, Andreas Cadhalpun wrote: > > > On 27.01.2017 02:56, Marton Balint wrote: > > > > I see 3 problems (wm4 explici

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-28 Thread Marton Balint
On Sat, 28 Jan 2017, Michael Niedermayer wrote: On Sat, Jan 28, 2017 at 01:26:40AM +0100, Andreas Cadhalpun wrote: On 27.01.2017 02:56, Marton Balint wrote: I see 3 problems (wm4 explicitly named them, but I also had them in mind) - Little benefit, yet - Makes the code less clean, more clutte

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-28 Thread wm4
On Fri, 27 Jan 2017 21:48:05 -0500 "Ronald S. Bultje" wrote: > Hi, > > On Fri, Jan 27, 2017 at 9:28 PM, Michael Niedermayer > wrote: > > > On Sat, Jan 28, 2017 at 01:26:40AM +0100, Andreas Cadhalpun wrote: > > > On 27.01.2017 02:56, Marton Balint wrote: > > > > I see 3 problems (wm4 explic

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-27 Thread Ronald S. Bultje
Hi, On Fri, Jan 27, 2017 at 9:28 PM, Michael Niedermayer wrote: > On Sat, Jan 28, 2017 at 01:26:40AM +0100, Andreas Cadhalpun wrote: > > On 27.01.2017 02:56, Marton Balint wrote: > > > I see 3 problems (wm4 explicitly named them, but I also had them in > mind) > > > - Little benefit, yet > > > -

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-27 Thread Michael Niedermayer
On Sat, Jan 28, 2017 at 01:26:40AM +0100, Andreas Cadhalpun wrote: > On 27.01.2017 02:56, Marton Balint wrote: > > I see 3 problems (wm4 explicitly named them, but I also had them in mind) > > - Little benefit, yet > > - Makes the code less clean, more cluttered > > - Increases binary size > > > >

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-27 Thread Andreas Cadhalpun
On 27.01.2017 02:56, Marton Balint wrote: > I see 3 problems (wm4 explicitly named them, but I also had them in mind) > - Little benefit, yet > - Makes the code less clean, more cluttered > - Increases binary size > > The ideas I proposed (use macros, use common / factorized checks for common > va

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-27 Thread wm4
On Thu, 26 Jan 2017 17:02:37 +0100 Michael Niedermayer wrote: > On Thu, Jan 26, 2017 at 06:43:45AM +0100, wm4 wrote: > > On Thu, 26 Jan 2017 03:20:02 +0100 > > Michael Niedermayer wrote: > > > > > On Thu, Jan 26, 2017 at 02:58:07AM +0100, Andreas Cadhalpun wrote: > > > > On 26.01.2017 02:29

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-26 Thread Marton Balint
On Thu, 26 Jan 2017, Michael Niedermayer wrote: On Thu, Jan 26, 2017 at 03:52:04AM +0100, Marton Balint wrote: On Thu, 26 Jan 2017, Michael Niedermayer wrote: On Thu, Jan 26, 2017 at 02:58:07AM +0100, Andreas Cadhalpun wrote: On 26.01.2017 02:29, Ronald S. Bultje wrote: On Wed, Jan 25, 20

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-26 Thread Michael Niedermayer
On Thu, Jan 26, 2017 at 06:43:45AM +0100, wm4 wrote: > On Thu, 26 Jan 2017 03:20:02 +0100 > Michael Niedermayer wrote: > > > On Thu, Jan 26, 2017 at 02:58:07AM +0100, Andreas Cadhalpun wrote: > > > On 26.01.2017 02:29, Ronald S. Bultje wrote: > > > > On Wed, Jan 25, 2017 at 8:12 PM, Andreas Cad

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-26 Thread Paul B Mahol
On 1/26/17, wm4 wrote: > On Thu, 26 Jan 2017 03:20:02 +0100 > Michael Niedermayer wrote: > >> On Thu, Jan 26, 2017 at 02:58:07AM +0100, Andreas Cadhalpun wrote: >> > On 26.01.2017 02:29, Ronald S. Bultje wrote: >> > > On Wed, Jan 25, 2017 at 8:12 PM, Andreas Cadhalpun < >> > > andreas.cadhal...@g

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-25 Thread wm4
On Thu, 26 Jan 2017 03:20:02 +0100 Michael Niedermayer wrote: > On Thu, Jan 26, 2017 at 02:58:07AM +0100, Andreas Cadhalpun wrote: > > On 26.01.2017 02:29, Ronald S. Bultje wrote: > > > On Wed, Jan 25, 2017 at 8:12 PM, Andreas Cadhalpun < > > > andreas.cadhal...@googlemail.com> wrote: > > >

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-25 Thread Michael Niedermayer
On Thu, Jan 26, 2017 at 03:52:04AM +0100, Marton Balint wrote: > > On Thu, 26 Jan 2017, Michael Niedermayer wrote: > > >On Thu, Jan 26, 2017 at 02:58:07AM +0100, Andreas Cadhalpun wrote: > >>On 26.01.2017 02:29, Ronald S. Bultje wrote: > >>>On Wed, Jan 25, 2017 at 8:12 PM, Andreas Cadhalpun < > >

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-25 Thread Marton Balint
On Thu, 26 Jan 2017, Michael Niedermayer wrote: On Thu, Jan 26, 2017 at 02:58:07AM +0100, Andreas Cadhalpun wrote: On 26.01.2017 02:29, Ronald S. Bultje wrote: On Wed, Jan 25, 2017 at 8:12 PM, Andreas Cadhalpun < andreas.cadhal...@googlemail.com> wrote: Signed-off-by: Andreas Cadhalpun ---

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-25 Thread Michael Niedermayer
On Thu, Jan 26, 2017 at 02:58:07AM +0100, Andreas Cadhalpun wrote: > On 26.01.2017 02:29, Ronald S. Bultje wrote: > > On Wed, Jan 25, 2017 at 8:12 PM, Andreas Cadhalpun < > > andreas.cadhal...@googlemail.com> wrote: > > > >> Signed-off-by: Andreas Cadhalpun > >> --- > >> libavformat/nistspherede

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-25 Thread Andreas Cadhalpun
On 26.01.2017 02:29, Ronald S. Bultje wrote: > On Wed, Jan 25, 2017 at 8:12 PM, Andreas Cadhalpun < > andreas.cadhal...@googlemail.com> wrote: > >> Signed-off-by: Andreas Cadhalpun >> --- >> libavformat/nistspheredec.c | 11 +++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/liba

Re: [FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-25 Thread Ronald S. Bultje
Hi, On Wed, Jan 25, 2017 at 8:12 PM, Andreas Cadhalpun < andreas.cadhal...@googlemail.com> wrote: > Signed-off-by: Andreas Cadhalpun > --- > libavformat/nistspheredec.c | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/libavformat/nistspheredec.c b/libavformat/nistspheredec.

[FFmpeg-devel] [PATCH 5/9] nistspheredec: prevent overflow during block alignment calculation

2017-01-25 Thread Andreas Cadhalpun
Signed-off-by: Andreas Cadhalpun --- libavformat/nistspheredec.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/libavformat/nistspheredec.c b/libavformat/nistspheredec.c index 782d1dfbfb..3386497682 100644 --- a/libavformat/nistspheredec.c +++ b/libavformat/nistspheredec.c @@ -2