Re: [libav-devel] [PATCH] Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.

2011-09-08 Thread Kostya Shishkov
On Wed, Sep 07, 2011 at 09:43:03PM +0200, Laurent Aimar wrote: --- libavcodec/wavpack.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 62f6880..0a70c4c 100644 --- a/libavcodec/wavpack.c +++

Re: [libav-devel] [PATCH] Fixed invalid writes in wavpack decoder on corrupted bitstreams.

2011-09-08 Thread Kostya Shishkov
On Wed, Sep 07, 2011 at 10:17:39PM +0200, Laurent Aimar wrote: --- libavcodec/wavpack.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 8e81d2d..f43819c 100644 --- a/libavcodec/wavpack.c +++

Re: [libav-devel] [PATCH] Fixed invalid access in wavpack decoder on corrupted extra bits sub-blocks.

2011-09-08 Thread Kostya Shishkov
On Wed, Sep 07, 2011 at 11:12:32PM +0200, Laurent Aimar wrote: --- libavcodec/wavpack.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index f43819c..f6d30b0 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c

Re: [libav-devel] [PATCH] Fixed invalid access in wavpack decoder on corrupted bitstream.

2011-09-08 Thread Kostya Shishkov
On Wed, Sep 07, 2011 at 10:08:37PM +0200, Laurent Aimar wrote: See patch. Last two chunks (zeroing samples_left when end of data is reported) is fine, first chunks are a bit suspicious since they hit corner cases. For example, what happens if block ends with a run of zeroes? Probably some

Re: [libav-devel] [PATCH] avtools: -help syntax changes.

2011-09-08 Thread Luca Barbato
On 9/7/11 7:34 PM, Anton Khirnov wrote: Convoluted? -helptopic looks pretty straightforward to me That part is fine is just show_help() being called that way that isn't straightforward. lu ___ libav-devel mailing list libav-devel@libav.org

Re: [libav-devel] [PATCH 6/6] adpcmenc: Set bits_per_coded_sample

2011-09-08 Thread Luca Barbato
On 9/8/11 4:58 AM, Justin Ruggles wrote: Ok. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH] Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.

2011-09-08 Thread Laurent Aimar
On Thu, Sep 08, 2011 at 09:09:14AM +0200, Kostya Shishkov wrote: On Wed, Sep 07, 2011 at 09:43:03PM +0200, Laurent Aimar wrote: --- libavcodec/wavpack.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index

Re: [libav-devel] [PATCH] Fixed invalid access in wavpack decoder on corrupted bitstream.

2011-09-08 Thread Laurent Aimar
On Thu, Sep 08, 2011 at 09:23:56AM +0200, Kostya Shishkov wrote: On Wed, Sep 07, 2011 at 10:08:37PM +0200, Laurent Aimar wrote: See patch. Last two chunks (zeroing samples_left when end of data is reported) is fine, first chunks are a bit suspicious since they hit corner cases. For example,

Re: [libav-devel] [PATCH] Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.

2011-09-08 Thread Kostya Shishkov
On Thu, Sep 08, 2011 at 09:57:04AM +0200, Laurent Aimar wrote: On Thu, Sep 08, 2011 at 09:09:14AM +0200, Kostya Shishkov wrote: On Wed, Sep 07, 2011 at 09:43:03PM +0200, Laurent Aimar wrote: --- libavcodec/wavpack.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)

Re: [libav-devel] [PATCH] Fixed invalid access in wavpack decoder on corrupted bitstream.

2011-09-08 Thread Kostya Shishkov
On Thu, Sep 08, 2011 at 10:01:54AM +0200, Laurent Aimar wrote: On Thu, Sep 08, 2011 at 09:23:56AM +0200, Kostya Shishkov wrote: On Wed, Sep 07, 2011 at 10:08:37PM +0200, Laurent Aimar wrote: See patch. Last two chunks (zeroing samples_left when end of data is reported) is fine, first

Re: [libav-devel] [PATCH] Fixed invalid access in wavpack decoder on corrupted bitstream.

2011-09-08 Thread Martin Storsjö
On Thu, 8 Sep 2011, Kostya Shishkov wrote: On Thu, Sep 08, 2011 at 10:01:54AM +0200, Laurent Aimar wrote: On Thu, Sep 08, 2011 at 09:23:56AM +0200, Kostya Shishkov wrote: On Wed, Sep 07, 2011 at 10:08:37PM +0200, Laurent Aimar wrote: See patch. Last two chunks (zeroing samples_left when

Re: [libav-devel] [PATCH] Fixed invalid access in wavpack decoder on corrupted bitstream.

2011-09-08 Thread Kostya Shishkov
On Thu, Sep 08, 2011 at 12:07:46PM +0300, Martin Storsjö wrote: [...] Pushed this one and the other two that you ok'd so far - only one left pending ok? Yes, seems so (with the number of decorrelation terms) ___ libav-devel mailing list

[libav-devel] [PATCH 2/3] mpegts.c: reindent

2011-09-08 Thread aviadr1
From: Aviad Rozenhek avia...@gmail.com --- libavformat/mpegts.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 9636274..6ac7cd3 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1413,10 +1413,10 @@

[libav-devel] [PATCH 1/3] prevent incorrect continuity count error messages from appearing for table PIDs

2011-09-08 Thread aviadr1
From: Aviad Rozenhek avia...@gmail.com --- libavformat/mpegts.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index fa5bd4c..9636274 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1411,12 +1411,14 @@

[libav-devel] [PATCH 3/3] improve logging for continuity errors

2011-09-08 Thread aviadr1
From: Aviad Rozenhek avia...@gmail.com --- libavformat/mpegts.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 6ac7cd3..dac5903 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1293,7 +1293,7 @@ static

Re: [libav-devel] [PATCH 1/3] prevent incorrect continuity count error messages from appearing for table PIDs

2011-09-08 Thread Luca Barbato
On 9/8/11 11:58 AM, avia...@gmail.com wrote: From: Aviad Rozenhekavia...@gmail.com looks ok, I'd rework a little more the commit message. basically on seek it resets all the pids not just those that contain pes, isn'it lu ___ libav-devel mailing

Re: [libav-devel] [PATCH 5/6] adpcmenc:Optimize adpcm_ima_qt_compress_sample()

2011-09-08 Thread Luca Barbato
On 9/8/11 4:58 AM, Justin Ruggles wrote: From: Michael Niedermayermichae...@gmx.at What is the performance gain in hand unrolling this loop? lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 2/3] mpegts.c: reindent

2011-09-08 Thread Diego Biurrun
On Thu, Sep 08, 2011 at 12:58:26PM +0300, avia...@gmail.com wrote: --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1413,10 +1413,10 @@ static int handle_packets(MpegTSContext *ts, int nb_packets) for (i = 0; i NB_PID_MAX; i++) { if (ts-pids[i]) {

Re: [libav-devel] [PATCH 3/3] improve logging for continuity errors

2011-09-08 Thread Luca Barbato
On 9/8/11 11:58 AM, avia...@gmail.com wrote: From: Aviad Rozenhekavia...@gmail.com --- libavformat/mpegts.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 6ac7cd3..dac5903 100644 --- a/libavformat/mpegts.c +++

Re: [libav-devel] [PATCH 2/3] mpegts.c: reindent

2011-09-08 Thread Diego Biurrun
On Thu, Sep 08, 2011 at 03:19:49PM +0300, aviad rozenhek wrote: On Thu, Sep 8, 2011 at 14:49, Diego Biurrun di...@biurrun.de wrote: On Thu, Sep 08, 2011 at 12:58:26PM +0300, avia...@gmail.com wrote: --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1413,10 +1413,10 @@

[libav-devel] [PATCH] Employ FF_ARRAY_ELEMS instead of manually calculating array length.

2011-09-08 Thread Diego Biurrun
--- libavformat/avlanguage.c |3 ++- libavformat/mxf.c|2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libavformat/avlanguage.c b/libavformat/avlanguage.c index 787382e..e606ef2 100644 --- a/libavformat/avlanguage.c +++ b/libavformat/avlanguage.c @@ -20,6

[libav-devel] [PATCH] fifo-test: eliminate an ugly cast and variable indirection

2011-09-08 Thread Diego Biurrun
--- libavutil/fifo.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/libavutil/fifo.c b/libavutil/fifo.c index 5774d33..75a0439 100644 --- a/libavutil/fifo.c +++ b/libavutil/fifo.c @@ -145,8 +145,7 @@ int main(void) /* peek at FIFO */ n =

Re: [libav-devel] [PATCH] Employ FF_ARRAY_ELEMS instead of manually calculating array length.

2011-09-08 Thread Kostya Shishkov
On Thu, Sep 08, 2011 at 02:29:01PM +0200, Diego Biurrun wrote: --- libavformat/avlanguage.c |3 ++- libavformat/mxf.c|2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libavformat/avlanguage.c b/libavformat/avlanguage.c index 787382e..e606ef2 100644 ---

Re: [libav-devel] [PATCH] fifo-test: eliminate an ugly cast and variable indirection

2011-09-08 Thread Stefano Sabatini
On date Thursday 2011-09-08 14:31:41 +0200, Diego Biurrun encoded: --- libavutil/fifo.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/libavutil/fifo.c b/libavutil/fifo.c index 5774d33..75a0439 100644 --- a/libavutil/fifo.c +++ b/libavutil/fifo.c @@ -145,8

Re: [libav-devel] [PATCH 1/3] prevent incorrect continuity count error messages from appearing for table PIDs

2011-09-08 Thread aviad rozenhek
On Thu, Sep 8, 2011 at 14:43, Luca Barbato lu_z...@gentoo.org wrote: On 9/8/11 11:58 AM, avia...@gmail.com wrote: From: Aviad Rozenhekavia...@gmail.com looks ok, I'd rework a little more the commit message. basically on seek it resets all the pids not just those that contain pes, isn'it

[libav-devel] [PATCH] on seek, reset continuity counter for all PIDs. prevents false positive continuity counter error logs.

2011-09-08 Thread Aviad Rozenhek
--- libavformat/mpegts.c | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index fa5bd4c..6ac7cd3 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1411,12 +1411,14 @@ static int

Re: [libav-devel] [PATCH] fifo-test: eliminate an ugly cast and variable indirection

2011-09-08 Thread Diego Biurrun
On Thu, Sep 08, 2011 at 02:55:15PM +0200, Stefano Sabatini wrote: On date Thursday 2011-09-08 14:31:41 +0200, Diego Biurrun encoded: --- libavutil/fifo.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/libavutil/fifo.c b/libavutil/fifo.c index

[libav-devel] [PATCH 1/6] Fix input buffer size check in adpcm_ea decoder.

2011-09-08 Thread Justin Ruggles
From: Reimar Döffinger reimar.doeffin...@gmx.de Unfortunately the output buffer size check assumes that the input buffer is never over-consumed, thus this actually also allowed to write outside the output buffer if lucky. Based on: git.videolan.org/ffmpeg.git commit

Re: [libav-devel] [PATCH 2/6] permit decoding of multichannel ADPCM_EA_XAS

2011-09-08 Thread Luca Barbato
On 9/8/11 4:58 AM, Justin Ruggles wrote: From: Peter Rosspr...@xvid.org Signed-off-by: Michael Niedermayermichae...@gmx.at --- libavcodec/adpcm.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 10bda64..c81d1d2 100644 ---

Re: [libav-devel] [PATCH 5/6] adpcmenc:Optimize adpcm_ima_qt_compress_sample()

2011-09-08 Thread Justin Ruggles
On 09/08/2011 07:46 AM, Luca Barbato wrote: On 9/8/11 4:58 AM, Justin Ruggles wrote: From: Michael Niedermayermichae...@gmx.at What is the performance gain in hand unrolling this loop? On Athlon64 it goes from 60 cycles to 54 cycles. -Justin ___

Re: [libav-devel] [PATCH 5/6] adpcmenc:Optimize adpcm_ima_qt_compress_sample()

2011-09-08 Thread Måns Rullgård
Justin Ruggles justin.rugg...@gmail.com writes: On 09/08/2011 07:46 AM, Luca Barbato wrote: On 9/8/11 4:58 AM, Justin Ruggles wrote: From: Michael Niedermayermichae...@gmx.at What is the performance gain in hand unrolling this loop? On Athlon64 it goes from 60 cycles to 54 cycles. Which

Re: [libav-devel] [PATCH] postprocess.c: filter name needs to be double 0 terminated

2011-09-08 Thread Diego Biurrun
I'm surprised nobody has bitten yet.. On Fri, Aug 26, 2011 at 08:33:02PM +0200, Reinhard Tartler wrote: On Fri, Aug 26, 2011 at 19:01:51 (CEST), Kostya wrote: On Fri, Aug 26, 2011 at 06:43:03PM +0200, Anton Khirnov wrote: And on a totally unrelated note, let's mark libpostproc for

Re: [libav-devel] [PATCH 5/6] adpcmenc:Optimize adpcm_ima_qt_compress_sample()

2011-09-08 Thread Justin Ruggles
On 09/08/2011 11:49 AM, Måns Rullgård wrote: Justin Ruggles justin.rugg...@gmail.com writes: On 09/08/2011 07:46 AM, Luca Barbato wrote: On 9/8/11 4:58 AM, Justin Ruggles wrote: From: Michael Niedermayermichae...@gmx.at What is the performance gain in hand unrolling this loop? On

Re: [libav-devel] [PATCH] Fixed invalid writes in wavpack decoder on corrupted bitstreams.

2011-09-08 Thread Alex Converse
On Wed, Sep 7, 2011 at 2:46 PM, Laurent Aimar fen...@elivagar.org wrote: On Wed, Sep 07, 2011 at 02:43:48PM -0700, Alex Converse wrote:  libavcodec/wavpack.c |    6 +++---  1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index

Re: [libav-devel] [PATCH] mpeg12: cosmetics: reformat as KR

2011-09-08 Thread Diego Biurrun
On Tue, Sep 06, 2011 at 09:49:16AM -0700, Ronald S. Bultje wrote: On Tue, Sep 6, 2011 at 2:51 AM, Diego Biurrun di...@biurrun.de wrote: --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -49,28 +49,20 @@ -static inline int mpeg1_decode_block_intra(MpegEncContext *s, -          

[libav-devel] [PATCH] mpeg12: reorder functions to avoid ugly forward declarations

2011-09-08 Thread Diego Biurrun
--- As a positive side-effect, this eliminates 80+ character lines that received complaints during the mpeg12.c reformatting patch review. libavcodec/mpeg12.c | 1053 +-- 1 files changed, 521 insertions(+), 532 deletions(-) diff --git

Re: [libav-devel] [PATCH 3/3] improve logging for continuity errors

2011-09-08 Thread Georgi Chorbadzhiyski
On 9/8/11 2:52 PM, Luca Barbato wrote: On 9/8/11 11:58 AM, avia...@gmail.com wrote: From: Aviad Rozenhekavia...@gmail.com --- libavformat/mpegts.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 6ac7cd3..dac5903 100644 ---

[libav-devel] [PATCH] wavpack: Check error codes rather than working around error conditions.

2011-09-08 Thread Alex Converse
--- libavcodec/wavpack.c | 13 ++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 53aab6d..0604452 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -1120,6 +1120,10 @@ static int

Re: [libav-devel] [PATCH] Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.

2011-09-08 Thread Laurent Aimar
On Thu, Sep 08, 2011 at 10:24:40AM +0200, Kostya Shishkov wrote: On Thu, Sep 08, 2011 at 09:57:04AM +0200, Laurent Aimar wrote: On Thu, Sep 08, 2011 at 09:09:14AM +0200, Kostya Shishkov wrote: On Wed, Sep 07, 2011 at 09:43:03PM +0200, Laurent Aimar wrote: --- libavcodec/wavpack.c |

Re: [libav-devel] [libav-commits] Fixed invalid writes in wavpack decoder on corrupted bitstreams.

2011-09-08 Thread Martin Storsjö
On Thu, 8 Sep 2011, Alex Converse wrote: On Thu, Sep 8, 2011 at 2:01 AM, Laurent Aimar g...@libav.org wrote: Module: libav Branch: master Commit: 0aedab03405849962b469277afe047aa2c61a87f Author:    Laurent Aimar fen...@videolan.org Committer: Martin Storsjö mar...@martin.st Date:      Wed Sep

Re: [libav-devel] [PATCH] Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.

2011-09-08 Thread Kostya Shishkov
On Thu, Sep 08, 2011 at 09:58:33PM +0200, Laurent Aimar wrote: Hi, On Thu, Sep 08, 2011 at 09:54:50PM +0200, Kostya Shishkov wrote: It's initialised here and on error it would use random (last correct) value for it. Not that it really matters since decoding won't start anyway

Re: [libav-devel] [PATCH] Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.

2011-09-08 Thread Laurent Aimar
On Thu, Sep 08, 2011 at 10:05:40PM +0200, Kostya Shishkov wrote: On Thu, Sep 08, 2011 at 09:58:33PM +0200, Laurent Aimar wrote: Hi, On Thu, Sep 08, 2011 at 09:54:50PM +0200, Kostya Shishkov wrote: It's initialised here and on error it would use random (last correct) value

Re: [libav-devel] [PATCH] Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.

2011-09-08 Thread Kostya Shishkov
On Thu, Sep 08, 2011 at 10:11:17PM +0200, Laurent Aimar wrote: On Thu, Sep 08, 2011 at 10:05:40PM +0200, Kostya Shishkov wrote: On Thu, Sep 08, 2011 at 09:58:33PM +0200, Laurent Aimar wrote: Hi, On Thu, Sep 08, 2011 at 09:54:50PM +0200, Kostya Shishkov wrote: It's initialised

[libav-devel] [PATCH] get_bits: Add optional bounds checking

2011-09-08 Thread Alex Converse
Based on a patch from The Chromium Projects. --- libavcodec/get_bits.h | 44 +--- 1 files changed, 41 insertions(+), 3 deletions(-) diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h index d2ae345..d910686 100644 --- a/libavcodec/get_bits.h +++

Re: [libav-devel] [PATCH] get_bits: Add optional bounds checking

2011-09-08 Thread Alex Converse
On Thu, Sep 8, 2011 at 3:18 PM, Alex Converse alex.conve...@gmail.com wrote: Based on a patch from The Chromium Projects. ---  libavcodec/get_bits.h |   44 +---  1 files changed, 41 insertions(+), 3 deletions(-) Here is the original:

[libav-devel] [PATCH] [RFC] matroskadec: bail on parsing of incorrect seek index segments

2011-09-08 Thread Dustin Brody
--- libavformat/matroskadec.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 0379977..01c9a7b 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1148,7 +1148,7 @@ static int

[libav-devel] [PATCH] Checked get_bits.h functions to prevent overread

2011-09-08 Thread Laurent Aimar
Hi, After trying some fuzzing on libavcodec, it seems that a lot of decoders does not check (or not enough) for buffer overread which can lead for some to a segfault. I attached a patch that make get_bits.h function checked for overread by default but let safe decoders disabling the checks at

Re: [libav-devel] [PATCH] Checked get_bits.h functions to prevent overread

2011-09-08 Thread Ronald S. Bultje
Hi, On Thu, Sep 8, 2011 at 4:05 PM, Laurent Aimar fen...@elivagar.org wrote:  I attached a patch that make get_bits.h function checked for overread by default but let safe decoders disabling the checks at compilation time by defining UNCHECK_BITSTREAM_READER before including get_bits.h.  If

Re: [libav-devel] [FFmpeg-devel] [PATCH] Checked get_bits.h functions to prevent overread

2011-09-08 Thread Laurent Aimar
On Thu, Sep 08, 2011 at 04:12:53PM -0700, Ronald S. Bultje wrote: +#ifndef UNCHECK_BITSTREAM_READER +# warn Checked bistream reader unimplemented +#endif biTstream. Locally fixed, thanks. -- fenrir ___ libav-devel mailing list

Re: [libav-devel] [FFmpeg-devel] [PATCH] Checked get_bits.h functions to prevent overread

2011-09-08 Thread Laurent Aimar
Hi, On Fri, Sep 09, 2011 at 01:57:38AM +0200, Michael Niedermayer wrote: One decoder breaks with this patch: mpegaudio. It seems to do weird things with two get bit context and switching them while decoding. I will try to have a look at it (unless someone would volunteer to explain me what

Re: [libav-devel] [PATCH] Checked get_bits.h functions to prevent overread

2011-09-08 Thread Alex Converse
On Thu, Sep 8, 2011 at 4:05 PM, Laurent Aimar fen...@elivagar.org wrote: @@ -172,10 +184,18 @@ static inline int get_bits_count(const GetBitContext *s){ static inline void skip_bits_long(GetBitContext *s, int n){ s-index += n; +#ifndef UNCHECK_BITSTREAM_READER +if (s-index

Re: [libav-devel] [PATCH] Checked get_bits.h functions to prevent overread

2011-09-08 Thread Alex Converse
On Thu, Sep 8, 2011 at 4:05 PM, Laurent Aimar fen...@elivagar.org wrote: Hi,  After trying some fuzzing on libavcodec, it seems that a lot of decoders does not check (or not enough) for buffer overread which can lead for some to a segfault.  I attached a patch that make get_bits.h function

Re: [libav-devel] [PATCH] Checked get_bits.h functions to prevent overread

2011-09-08 Thread Ronald S. Bultje
Hi, On Thu, Sep 8, 2011 at 6:06 PM, Alex Converse alex.conve...@gmail.com wrote: This is a very expensive form of error resilience and there are a lot of use cases where people just don't care. They will tolerate the SEGV on the occasional bad file if it means they can decode a good with