Re: [FFmpeg-devel] [PATCH 2/3] exr: fix out-of-bounds read

2016-11-16 Thread Andreas Cadhalpun
On 16.11.2016 21:07, Paul B Mahol wrote: > On 11/16/16, Andreas Cadhalpun wrote: >> channel_index can be -1. >> >> This problem was introduced in commit >> 2dd7b46132e2801ef34fe1b5c27e0113cdcfa2f9. >> > > lgtm Pushed together with th

Re: [FFmpeg-devel] [PATCH 1/3] exr: limit expected_len to tmp buffer size

2016-11-16 Thread Andreas Cadhalpun
On 16.11.2016 22:16, Martin Vignali wrote: > I think the trouble come from another place > The current channel offset is not correct for uint32 (because it use 1<<0 = 1 > instead of 4 for uint32) > > Some months ago i propose a patch who was not accepted for uint32 support in > exr. > But the cu

Re: [FFmpeg-devel] [PATCH 1/3] exr: limit expected_len to tmp buffer size

2016-11-16 Thread Andreas Cadhalpun
Hi, On 16.11.2016 21:29, Martin Vignali wrote: > in what case expected_len can be > to uncompress_size ? td->xsize = 800 td->ysize = 16 s->current_channel_offset = 5 td->channel_line_size = s->current_channel_offset * td->xsize = 4000 uncompressed_size = td->channel_line_size * td->ysize = 64000

[FFmpeg-devel] [PATCH 3/3] exr: reindent after previous commit

2016-11-16 Thread Andreas Cadhalpun
Signed-off-by: Andreas Cadhalpun --- libavcodec/exr.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/exr.c b/libavcodec/exr.c index bff08f2..35e07d4 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -1431,14 +1431,14 @@ static int

[FFmpeg-devel] [PATCH 2/3] exr: fix out-of-bounds read

2016-11-16 Thread Andreas Cadhalpun
channel_index can be -1. This problem was introduced in commit 2dd7b46132e2801ef34fe1b5c27e0113cdcfa2f9. Signed-off-by: Andreas Cadhalpun --- libavcodec/exr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 54869d2..bff08f2

[FFmpeg-devel] [PATCH 1/3] exr: limit expected_len to tmp buffer size

2016-11-16 Thread Andreas Cadhalpun
This fixes crashes due to pointer corruption caused by invalid writes. The problem was introduced in commit 03152e74dfdc7f438cb4a10402c4de744e807e22. Signed-off-by: Andreas Cadhalpun --- libavcodec/exr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/exr.c b/libavcodec/exr.c

Re: [FFmpeg-devel] [PATCH 2/2] libschroedingerdec: fix leaking of framewithpts

2016-11-16 Thread Andreas Cadhalpun
On 16.11.2016 15:14, Michael Niedermayer wrote: > On Wed, Nov 16, 2016 at 01:48:05PM +0100, wm4 wrote: >> On Wed, 16 Nov 2016 13:21:34 +0100 >> Michael Niedermayer wrote: >>> On Tue, Nov 15, 2016 at 09:56:16PM +0100, Andreas Cadhalpun wrote: >>>> However, con

Re: [FFmpeg-devel] [PATCH 2/2] libschroedingerdec: fix leaking of framewithpts

2016-11-16 Thread Andreas Cadhalpun
On 16.11.2016 13:21, Michael Niedermayer wrote: > On Tue, Nov 15, 2016 at 09:56:16PM +0100, Andreas Cadhalpun wrote: >> libschroedingerdec.c | 16 +--- >> 1 file changed, 9 insertions(+), 7 deletions(-) >> 6cc9768bea564b1bf50a25198deaf95adfa3151a >>

Re: [FFmpeg-devel] [PATCH] dds: limit 4 bpp handling to AV_PIX_FMT_PAL8

2016-11-16 Thread Andreas Cadhalpun
On 16.11.2016 07:52, Paul B Mahol wrote: > On 11/15/16, Andreas Cadhalpun wrote: >> This fixes NULL pointer dereferencing for formats, where frame->data[1] >> is not allocated. >> >> The problem was introduced in commit >> 257fbc3af4cba08ac471dab68924182160

[FFmpeg-devel] [PATCH] oggparsevp8: set need_context_update when changing codec id

2016-11-15 Thread Andreas Cadhalpun
Otherwise the codec context and codecpar might disagree on the codec id, triggering asserts in av_parser_parse2. Signed-off-by: Andreas Cadhalpun --- libavformat/oggparsevp8.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/oggparsevp8.c b/libavformat/oggparsevp8.c index c534ab1

[FFmpeg-devel] [PATCH] dds: limit 4 bpp handling to AV_PIX_FMT_PAL8

2016-11-15 Thread Andreas Cadhalpun
This fixes NULL pointer dereferencing for formats, where frame->data[1] is not allocated. The problem was introduced in commit 257fbc3af4cba08ac471dab68924182160bde6fd. Signed-off-by: Andreas Cadhalpun --- libavcodec/dds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

Re: [FFmpeg-devel] [PATCH] mlz: limit next_code to data buffer size

2016-11-15 Thread Andreas Cadhalpun
On 15.11.2016 10:55, Michael Niedermayer wrote: > On Tue, Nov 15, 2016 at 12:12:45AM +0100, Andreas Cadhalpun wrote: >> This fixes a heap-buffer-overflow detected by AddressSanitizer. >> >> Signed-off-by: Andreas Cadhalpun >> --- >> libavcodec/mlz.c | 8

Re: [FFmpeg-devel] [PATCH 2/2] libschroedingerdec: fix leaking of framewithpts

2016-11-15 Thread Andreas Cadhalpun
On 15.11.2016 03:18, Michael Niedermayer wrote: > On Sun, Nov 13, 2016 at 11:25:32PM +0100, Andreas Cadhalpun wrote: >> Signed-off-by: Andreas Cadhalpun >> --- >> libavcodec/libschroedingerdec.c | 26 +- >> 1 file changed, 17 insertions(+), 9 de

[FFmpeg-devel] [PATCH] mlz: limit next_code to data buffer size

2016-11-14 Thread Andreas Cadhalpun
This fixes a heap-buffer-overflow detected by AddressSanitizer. Signed-off-by: Andreas Cadhalpun --- libavcodec/mlz.c | 8 1 file changed, 8 insertions(+) diff --git a/libavcodec/mlz.c b/libavcodec/mlz.c index a2d1b89..ebce796 100644 --- a/libavcodec/mlz.c +++ b/libavcodec/mlz.c

Re: [FFmpeg-devel] [libav-devel] [PATCH] libopusdec: fix out-of-bounds read

2016-11-14 Thread Andreas Cadhalpun
On 14.11.2016 22:59, Carl Eugen Hoyos wrote: > 2016-11-14 21:55 GMT+01:00 Andreas Cadhalpun > : > >>> channels being zero is perfectly valid, it means the caller does not >>> know the channel count and expects the decoder to read it from the >>> bitstream. &

Re: [FFmpeg-devel] [PATCH]lavf/mov: Fix an out-of-bound-read in mov_read_mac_string().

2016-11-14 Thread Andreas Cadhalpun
On 14.11.2016 14:56, Carl Eugen Hoyos wrote: > I believe attached patch fixes an out-of-bound-read in mov_read_mac_string() > if p > Please comment, Carl Eugen This patch is not necessary, the issue was fixed with commit 437f5daf0. If (p < end) is false, the 'else if (p < end)' branch will not b

Re: [FFmpeg-devel] [PATCH] softfloat: handle -INT_MAX correctly

2016-11-14 Thread Andreas Cadhalpun
On 14.11.2016 00:30, Michael Niedermayer wrote: > On Sun, Nov 13, 2016 at 08:55:01PM +0100, Andreas Cadhalpun wrote: >> This is similar to commit 9ac61e73d0843ec4b83f4e3d47eded73234e406e. >> >> Signed-off-by: Andreas Cadhalpun >> --- >> libavutil/softflo

Re: [FFmpeg-devel] [PATCH 2/2] lavfi: make filter_frame non-recursive.

2016-11-14 Thread Andreas Cadhalpun
On 14.11.2016 21:38, Nicolas George wrote: > Le quartidi 24 brumaire, an CCXXV, Andreas Cadhalpun a écrit : >> Consider the (not so) theoretical case of API users simply (and wrongly) >> using the structs on the stack instead of dynamically allocating them. >> >> Wi

Re: [FFmpeg-devel] [libav-devel] [PATCH] libopusdec: fix out-of-bounds read

2016-11-14 Thread Andreas Cadhalpun
On 14.11.2016 20:54, Anton Khirnov wrote: > Quoting Andreas Cadhalpun (2016-11-14 20:30:10) >> On 14.11.2016 00:01, Luca Barbato wrote: >>> On 13/11/2016 19:23, Andreas Cadhalpun wrote: >>>> avc->channels can be 0. >>> >>> 0 and less than zero

Re: [FFmpeg-devel] [PATCH 2/2] lavfi: make filter_frame non-recursive.

2016-11-14 Thread Andreas Cadhalpun
On 14.11.2016 17:42, Nicolas George wrote: > What about: > > struct AVFilterLink { > ... > #ifdef FF_INTERNAL_API > #inclde "avfilterlink_internal.h" > #endif I suspect that having different sizes for the same struct in different parts of the code base will upset some static analyzers. (I'm t

Re: [FFmpeg-devel] [libav-devel] [PATCH] libopusdec: fix out-of-bounds read

2016-11-14 Thread Andreas Cadhalpun
On 14.11.2016 00:01, Luca Barbato wrote: > On 13/11/2016 19:23, Andreas Cadhalpun wrote: >> avc->channels can be 0. > > 0 and less than zero shouldn't be an error? Such values should be rejected, wherever they are set. However, ensuring that is a larger change I'm cur

[FFmpeg-devel] [PATCH 2/2] libschroedingerdec: fix leaking of framewithpts

2016-11-13 Thread Andreas Cadhalpun
Signed-off-by: Andreas Cadhalpun --- libavcodec/libschroedingerdec.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/libavcodec/libschroedingerdec.c b/libavcodec/libschroedingerdec.c index 1e392b3..83c790c 100644 --- a/libavcodec

[FFmpeg-devel] [PATCH 1/2] libschroedingerdec: don't produce empty frames

2016-11-13 Thread Andreas Cadhalpun
They are not valid and can cause problems/crashes for API users. Signed-off-by: Andreas Cadhalpun --- libavcodec/libschroedingerdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libschroedingerdec.c b/libavcodec/libschroedingerdec.c index c9930c7..1e392b3

[FFmpeg-devel] [PATCH] aacsbr_fixed: prevent sbr gain from being zero

2016-11-13 Thread Andreas Cadhalpun
It causes division by zero crashes. Signed-off-by: Andreas Cadhalpun --- libavcodec/aacsbr_fixed.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/aacsbr_fixed.c b/libavcodec/aacsbr_fixed.c index b26314a..d2a7027 100644 --- a/libavcodec/aacsbr_fixed.c +++ b/libavcodec

[FFmpeg-devel] [PATCH] softfloat: handle -INT_MAX correctly

2016-11-13 Thread Andreas Cadhalpun
This is similar to commit 9ac61e73d0843ec4b83f4e3d47eded73234e406e. Signed-off-by: Andreas Cadhalpun --- libavutil/softfloat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/softfloat.h b/libavutil/softfloat.h index a3b2238..48d0d59 100644 --- a/libavutil

[FFmpeg-devel] [PATCH] libopusdec: fix out-of-bounds read

2016-11-13 Thread Andreas Cadhalpun
avc->channels can be 0. Signed-off-by: Andreas Cadhalpun --- libavcodec/libopusdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libopusdec.c b/libavcodec/libopusdec.c index acc62f1..505ed57 100644 --- a/libavcodec/libopusdec.c +++ b/libavcodec/libopusde

Re: [FFmpeg-devel] [PATCH] filmstripdec: correctly check image dimensions

2016-11-13 Thread Andreas Cadhalpun
On 13.11.2016 18:48, Paul B Mahol wrote: > On 11/13/16, Andreas Cadhalpun wrote: >> This prevents a division by zero in read_packet. >> >> Signed-off-by: Andreas Cadhalpun >> --- >> libavformat/filmstripdec.c | 7 +++ >> 1 file changed, 3 insertions(

[FFmpeg-devel] [PATCH] filmstripdec: correctly check image dimensions

2016-11-13 Thread Andreas Cadhalpun
This prevents a division by zero in read_packet. Signed-off-by: Andreas Cadhalpun --- libavformat/filmstripdec.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libavformat/filmstripdec.c b/libavformat/filmstripdec.c index 414e276..0aeb594 100644 --- a/libavformat

Re: [FFmpeg-devel] [PATCH] vp9_mc_template: disable assert for SCALED == 0

2016-11-13 Thread Andreas Cadhalpun
On 13.11.2016 03:22, Ronald S. Bultje wrote: > Hi Andreas, > > On Nov 12, 2016 5:52 PM, "Andreas Cadhalpun" > mailto:andreas.cadhal...@googlemail.com>> > wrote: >> >> The handling of the other block sizes was disabled for 'SCALED == 0' in &

[FFmpeg-devel] [PATCH] vp9_mc_template: disable assert for SCALED == 0

2016-11-12 Thread Andreas Cadhalpun
The handling of the other block sizes was disabled for 'SCALED == 0' in commit dc96c0f9fc96bf4167633befc074394062793322, so this assert should be disabled, too, as it can now be triggered. Signed-off-by: Andreas Cadhalpun --- At least that would be the easy fix, but I'd be glad

Re: [FFmpeg-devel] [PATCH] pnmdec: make sure v is capped by maxval

2016-11-11 Thread Andreas Cadhalpun
On 11.11.2016 02:03, Michael Niedermayer wrote: > On Thu, Nov 10, 2016 at 08:52:29PM +0100, Andreas Cadhalpun wrote: >> pnmdec.c | 10 +++--- >> 1 file changed, 7 insertions(+), 3 deletions(-) >> 0dd61abddc422dd2ac37356f8271822d7e801b8e >> 0001-pnmdec-make-sure-

Re: [FFmpeg-devel] [PATCH] pnm: limit maxval to UINT16_MAX

2016-11-11 Thread Andreas Cadhalpun
On 11.11.2016 01:17, Michael Niedermayer wrote: > On Thu, Nov 10, 2016 at 08:54:37PM +0100, Andreas Cadhalpun wrote: >> From 'man ppm': The maximum color value (Maxval), again in ASCII decimal. >> Must be less than 65536. >> >

Re: [FFmpeg-devel] [PATCH] smvjpegdec: make sure cur_frame is not negative

2016-11-11 Thread Andreas Cadhalpun
On 11.11.2016 01:58, Michael Niedermayer wrote: > On Thu, Nov 10, 2016 at 10:14:04PM +0100, Andreas Cadhalpun wrote: >> This fixes a heap-buffer-overflow detected by AddressSanitizer. >> >> Signed-off-by: Andreas Cadhalpun >> --- >> libavcodec/smvjpegdec

[FFmpeg-devel] [PATCH] sbgdec: prevent NULL pointer access

2016-11-10 Thread Andreas Cadhalpun
Signed-off-by: Andreas Cadhalpun --- libavformat/sbgdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/sbgdec.c b/libavformat/sbgdec.c index bb020d7..cbedd12 100644 --- a/libavformat/sbgdec.c +++ b/libavformat/sbgdec.c @@ -927,7 +927,7 @@ static void

[FFmpeg-devel] [PATCH] smvjpegdec: make sure cur_frame is not negative

2016-11-10 Thread Andreas Cadhalpun
This fixes a heap-buffer-overflow detected by AddressSanitizer. Signed-off-by: Andreas Cadhalpun --- libavcodec/smvjpegdec.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/smvjpegdec.c b/libavcodec/smvjpegdec.c index 9057e86..e319e57 100644 --- a/libavcodec/smvjpegdec.c

Re: [FFmpeg-devel] [PATCH] icodec: correctly check avio_read return value

2016-11-10 Thread Andreas Cadhalpun
On 10.11.2016 21:14, Michael Niedermayer wrote: > On Wed, Nov 09, 2016 at 08:56:00PM +0100, Andreas Cadhalpun wrote: >> icodec.c |8 ++-- >> 1 file changed, 6 insertions(+), 2 deletions(-) >> 04c12ac83fea7b911f4050c547b77d1c48e9228b >> 0001-icodec-corre

Re: [FFmpeg-devel] [PATCH] dvbsubdec: fix division by zero in compute_default_clut

2016-11-10 Thread Andreas Cadhalpun
On 10.11.2016 17:42, Michael Niedermayer wrote: > On Wed, Nov 09, 2016 at 08:52:54PM +0100, Andreas Cadhalpun wrote: >> dvbsubdec.c |2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> 10b117a15971daf75d61efe486b961d3cc59d480 >> 0001-dvbsub

Re: [FFmpeg-devel] [PATCH] proresdec_lgpl: explicitly check coff[3] against slice_data_size

2016-11-10 Thread Andreas Cadhalpun
On 10.11.2016 14:38, Michael Niedermayer wrote: > On Wed, Nov 09, 2016 at 11:56:36PM +0100, Andreas Cadhalpun wrote: >> The implicit checks via v_data_size and a_data_size don't work in the case >> '(hdr_size > 7) && !ctx->alpha_info'. >> >

[FFmpeg-devel] [PATCH] pnm: limit maxval to UINT16_MAX

2016-11-10 Thread Andreas Cadhalpun
From 'man ppm': The maximum color value (Maxval), again in ASCII decimal. Must be less than 65536. Signed-off-by: Andreas Cadhalpun --- libavcodec/pnm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c ind

Re: [FFmpeg-devel] [PATCH] pnmdec: make sure v is capped by maxval

2016-11-10 Thread Andreas Cadhalpun
On 10.11.2016 02:26, Michael Niedermayer wrote: > On Wed, Nov 09, 2016 at 10:46:03PM +0100, Andreas Cadhalpun wrote: >> pnmdec.c |4 >> 1 file changed, 4 insertions(+) >> a970cb981be02ea692d0bf2e68976077f14f2de3 >> 0001-pnmdec-make-sure-v-is-cap

[FFmpeg-devel] [PATCH] proresdec_lgpl: explicitly check coff[3] against slice_data_size

2016-11-09 Thread Andreas Cadhalpun
The implicit checks via v_data_size and a_data_size don't work in the case '(hdr_size > 7) && !ctx->alpha_info'. This fixes segmentation faults due to invalid reads. This problem was introduced in commit 547c2f002a87f4412a83c23b0d60364be5e7ce58. Signed-off-by: Andre

[FFmpeg-devel] [PATCH] pgssubdec: only set w/h/linesize when allocating data

2016-11-09 Thread Andreas Cadhalpun
Rects with positive w/h/linesize but no data are invalid. Signed-off-by: Andreas Cadhalpun --- libavcodec/pgssubdec.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c index cef477d..b50b37b 100644 --- a/libavcodec

Re: [FFmpeg-devel] [PATCH] pnmdec: make sure v is capped by maxval

2016-11-09 Thread Andreas Cadhalpun
On 09.11.2016 21:55, Michael Niedermayer wrote: > On Wed, Nov 09, 2016 at 09:05:17PM +0100, Andreas Cadhalpun wrote: >> On 09.11.2016 11:10, Michael Niedermayer wrote: >>> On Wed, Nov 09, 2016 at 01:11:29AM +0100, Andreas Cadhalpun wrote: >>>> Otherwise put_bits c

Re: [FFmpeg-devel] [PATCH 2/2] iocodec: add ico_read_close to fix leaking ico->images

2016-11-09 Thread Andreas Cadhalpun
On 09.11.2016 17:27, Michael Niedermayer wrote: > On Wed, Nov 09, 2016 at 12:00:09AM +0100, Andreas Cadhalpun wrote: >> Signed-off-by: Andreas Cadhalpun >> --- >> libavformat/icodec.c | 8 >> 1 file changed, 8 insertions(+) > > LGTM with te typo

Re: [FFmpeg-devel] [PATCH 1/2] icodec: fix leaking pkt on error

2016-11-09 Thread Andreas Cadhalpun
On 09.11.2016 17:25, Michael Niedermayer wrote: > On Tue, Nov 08, 2016 at 11:59:45PM +0100, Andreas Cadhalpun wrote: >> Signed-off-by: Andreas Cadhalpun >> --- >> libavformat/icodec.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) > > should be o

Re: [FFmpeg-devel] [PATCH] escape124: reject codebook size 0

2016-11-09 Thread Andreas Cadhalpun
On 09.11.2016 11:12, Michael Niedermayer wrote: > On Wed, Nov 09, 2016 at 12:42:16AM +0100, Andreas Cadhalpun wrote: >> It causes a cb_depth of 32, leading to assertion failures in get_bits. >> >> Signed-off-by: Andreas Cadhalpun >> --- >> libavcodec/escape124

Re: [FFmpeg-devel] [PATCH] pnmdec: make sure v is capped by maxval

2016-11-09 Thread Andreas Cadhalpun
On 09.11.2016 11:10, Michael Niedermayer wrote: > On Wed, Nov 09, 2016 at 01:11:29AM +0100, Andreas Cadhalpun wrote: >> Otherwise put_bits can be called with a value that doesn't fit in the >> sample_len, causing an assertion failure. >> --- >> libavcodec/pnmdec.

Re: [FFmpeg-devel] [PATCH] icodec: correctly check avio_read return value

2016-11-09 Thread Andreas Cadhalpun
On 09.11.2016 02:31, Michael Niedermayer wrote: > On Tue, Nov 08, 2016 at 11:36:58PM +0100, Andreas Cadhalpun wrote: >> It can read less than the requested amount, in which case buf contains >> uninitialized data, causing problems like segmentation faults later on. >> >

Re: [FFmpeg-devel] [PATCH] dvbsubdec: fix division by zero in compute_default_clut

2016-11-09 Thread Andreas Cadhalpun
On 09.11.2016 02:27, Michael Niedermayer wrote: > On Tue, Nov 08, 2016 at 10:36:01PM +0100, Andreas Cadhalpun wrote: >> Since the loop goes down to i = 0 the number of iterations (variable >> count) is the original i, not i - 1. >> In the case of i originally being 1, this mi

[FFmpeg-devel] [PATCH] pnmdec: make sure v is capped by maxval

2016-11-08 Thread Andreas Cadhalpun
Otherwise put_bits can be called with a value that doesn't fit in the sample_len, causing an assertion failure. --- libavcodec/pnmdec.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c index ca97cc3..0381ea6 100644 --- a/libavcodec/pnmdec.c +++ b/li

[FFmpeg-devel] [PATCH] escape124: reject codebook size 0

2016-11-08 Thread Andreas Cadhalpun
It causes a cb_depth of 32, leading to assertion failures in get_bits. Signed-off-by: Andreas Cadhalpun --- libavcodec/escape124.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/escape124.c b/libavcodec/escape124.c index b872b3a..c3174ce 100644 --- a/libavcodec/escape124.c

Re: [FFmpeg-devel] [PATCH 2/2] iocodec: add ico_read_close to fix leaking ico->images

2016-11-08 Thread Andreas Cadhalpun
On 09.11.2016 00:28, Moritz Barsnick wrote: > On Wed, Nov 09, 2016 at 00:00:09 +0100, Andreas Cadhalpun wrote: >> [PATCH 2/2] iocodec: add ico_read_close to fix leaking ico->images > ^ icodec Fixed locally. Best r

[FFmpeg-devel] [PATCH 2/2] iocodec: add ico_read_close to fix leaking ico->images

2016-11-08 Thread Andreas Cadhalpun
Signed-off-by: Andreas Cadhalpun --- libavformat/icodec.c | 8 1 file changed, 8 insertions(+) diff --git a/libavformat/icodec.c b/libavformat/icodec.c index becbc0f..1d8e383 100644 --- a/libavformat/icodec.c +++ b/libavformat/icodec.c @@ -199,6 +199,13 @@ static int read_packet

[FFmpeg-devel] [PATCH 1/2] icodec: fix leaking pkt on error

2016-11-08 Thread Andreas Cadhalpun
Signed-off-by: Andreas Cadhalpun --- libavformat/icodec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/icodec.c b/libavformat/icodec.c index aad1416..becbc0f 100644 --- a/libavformat/icodec.c +++ b/libavformat/icodec.c @@ -174,8 +174,10 @@ static int

[FFmpeg-devel] [PATCH] icodec: correctly check avio_read return value

2016-11-08 Thread Andreas Cadhalpun
It can read less than the requested amount, in which case buf contains uninitialized data, causing problems like segmentation faults later on. Signed-off-by: Andreas Cadhalpun --- libavformat/icodec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/icodec.c b

[FFmpeg-devel] [PATCH] dvbsubdec: fix division by zero in compute_default_clut

2016-11-08 Thread Andreas Cadhalpun
: Andreas Cadhalpun --- libavcodec/dvbsubdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index e9f4765..31898ea 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -810,7 +810,7 @@ static void compute_default_clut

Re: [FFmpeg-devel] [PATCH] mpegts: prevent division by zero

2016-11-08 Thread Andreas Cadhalpun
On 08.11.2016 22:12, Michael Niedermayer wrote: > On Tue, Nov 08, 2016 at 09:38:49PM +0100, Andreas Cadhalpun wrote: >> On 08.11.2016 21:09, Michael Niedermayer wrote: >>> On Tue, Nov 08, 2016 at 07:47:02PM +0100, Andreas Cadhalpun wrote: >>>> On 08.11.2016 00

Re: [FFmpeg-devel] [PATCH] mpegts: prevent division by zero

2016-11-08 Thread Andreas Cadhalpun
On 08.11.2016 21:09, Michael Niedermayer wrote: > On Tue, Nov 08, 2016 at 07:47:02PM +0100, Andreas Cadhalpun wrote: >> On 08.11.2016 00:54, Michael Niedermayer wrote: >>> On Mon, Nov 07, 2016 at 11:49:52PM +0100, Andreas Cadhalpun wrote: >>>> Si

Re: [FFmpeg-devel] [PATCH] matroskadec: fix NULL pointer dereference in webm_dash_manifest_read_header

2016-11-08 Thread Andreas Cadhalpun
On 08.11.2016 01:12, Michael Niedermayer wrote: > On Tue, Nov 08, 2016 at 12:44:56AM +0100, Andreas Cadhalpun wrote: >> The code assumes that s->streams[0] is valid. >> >> Signed-off-by: Andreas Cadhalpun >> --- >> libavformat/matroskadec.c | 5 ++

Re: [FFmpeg-devel] [PATCH] mpegts: prevent division by zero

2016-11-08 Thread Andreas Cadhalpun
On 08.11.2016 00:54, Michael Niedermayer wrote: > On Mon, Nov 07, 2016 at 11:49:52PM +0100, Andreas Cadhalpun wrote: >> Signed-off-by: Andreas Cadhalpun >> --- >> libavformat/mpegts.c | 4 >> 1 file changed, 4 insertions(+) >> >> diff --git a/liba

[FFmpeg-devel] [PATCH] matroskadec: fix NULL pointer dereference in webm_dash_manifest_read_header

2016-11-07 Thread Andreas Cadhalpun
The code assumes that s->streams[0] is valid. Signed-off-by: Andreas Cadhalpun --- libavformat/matroskadec.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 32f5e49..130d92e 100644 --- a/libavformat/matroskadec.c ++

[FFmpeg-devel] [PATCH] mpegts: prevent division by zero

2016-11-07 Thread Andreas Cadhalpun
Signed-off-by: Andreas Cadhalpun --- libavformat/mpegts.c | 4 1 file changed, 4 insertions(+) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index fad10c6..77d63f2 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -2692,6 +2692,10 @@ static int mpegts_read_header

Re: [FFmpeg-devel] [libav-devel] [PATCH] mpegpicture: use coded_width/coded_height to allocate frame

2016-11-07 Thread Andreas Cadhalpun
On 07.11.2016 22:52, Luca Barbato wrote: > On 07/11/2016 22:32, Andreas Cadhalpun wrote: >> This fixes a heap-buffer-overflow in ff_er_frame_end when decoding mss2 with >> coded_width/coded_height larger than width/height. >> >> Signed-off-by: Andreas Cadhalpun >>

Re: [FFmpeg-devel] [PATCH 1/2] Move av_show_help_children() to avutil/opt

2016-11-07 Thread Andreas Cadhalpun
On 07.11.2016 20:26, James Almer wrote: > ffserver is being dropped from the project, as announced in the news page. > > Reynaldo however wants to have a working copy somewhere so he's moving it to > an external repo and for that he's making it work without internal API, with > some help from Mich

[FFmpeg-devel] [PATCH] mpegpicture: use coded_width/coded_height to allocate frame

2016-11-07 Thread Andreas Cadhalpun
This fixes a heap-buffer-overflow in ff_er_frame_end when decoding mss2 with coded_width/coded_height larger than width/height. Signed-off-by: Andreas Cadhalpun --- libavcodec/mpegpicture.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/mpegpicture.c

Re: [FFmpeg-devel] [PATCH 1/2] Move av_show_help_children() to avutil/opt

2016-11-07 Thread Andreas Cadhalpun
On 04.11.2016 21:16, Michael Niedermayer wrote: > diff --git a/libavutil/opt.c b/libavutil/opt.c > index cd16bd1..1b8dae2 100644 > --- a/libavutil/opt.c > +++ b/libavutil/opt.c > @@ -1992,3 +1992,15 @@ int av_opt_serialize(void *obj, int opt_flags, int > flags, char **buffer, > av_bprint_fina

Re: [FFmpeg-devel] [PATCH] hls: fix leaking avio_opts on hls_read_header error

2016-11-07 Thread Andreas Cadhalpun
On 07.11.2016 16:20, Michael Niedermayer wrote: > On Mon, Nov 07, 2016 at 12:11:25AM +0100, Andreas Cadhalpun wrote: >> Use the hls_close function to reduce code duplication. >> >> Signed-off-by: Andreas Cadhalpun >> --- >> libavformat/hls.c | 30 ++--

Re: [FFmpeg-devel] [PATCH] mpegaudio_parser: don't return AVERROR_PATCHWELCOME

2016-11-07 Thread Andreas Cadhalpun
On 07.11.2016 10:23, Michael Niedermayer wrote: > On Mon, Nov 07, 2016 at 01:21:01AM +0100, Andreas Cadhalpun wrote: >> The API does not allow returning AVERROR codes. >> >> It triggers an assert in av_parser_parse2. >> >> Signed-off-by: Andreas Cadhalpun >>

[FFmpeg-devel] [PATCH] mpegaudio_parser: don't return AVERROR_PATCHWELCOME

2016-11-06 Thread Andreas Cadhalpun
The API does not allow returning AVERROR codes. It triggers an assert in av_parser_parse2. Signed-off-by: Andreas Cadhalpun --- libavcodec/mpegaudio_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mpegaudio_parser.c b/libavcodec/mpegaudio_parser.c index

Re: [FFmpeg-devel] [PATCH 01/12] adxdec: validate sample_rate

2016-11-06 Thread Andreas Cadhalpun
On 02.11.2016 23:09, Andreas Cadhalpun wrote: > In the absence of further comments, I intend to push this set in a few days. I've pushed this now. Best regards, Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org

[FFmpeg-devel] [PATCH] hls: fix leaking avio_opts on hls_read_header error

2016-11-06 Thread Andreas Cadhalpun
Use the hls_close function to reduce code duplication. Signed-off-by: Andreas Cadhalpun --- libavformat/hls.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index 2bf86fa..3ae3c7c 100644 --- a

Re: [FFmpeg-devel] [PATCH 3/3 v2] avformat/hls: Add missing error check for avcodec_parameters_copy()

2016-11-06 Thread Andreas Cadhalpun
On 06.11.2016 23:52, Anssi Hannula wrote: > Signed-off-by: Anssi Hannula > --- > > 07.11.2016, 00:35, Andreas Cadhalpun kirjoitti: >> On 06.11.2016 22:44, Anssi Hannula wrote: >>> Signed-off-by: Anssi Hannula >>> --- >>> libavformat/hls.c |

Re: [FFmpeg-devel] [PATCH 3/3] avformat/hls: Add missing error check for avcodec_parameters_copy()

2016-11-06 Thread Andreas Cadhalpun
On 06.11.2016 22:44, Anssi Hannula wrote: > Signed-off-by: Anssi Hannula > --- > libavformat/hls.c | 18 ++ > 1 file changed, 14 insertions(+), 4 deletions(-) > This misses checking the return code of the other occurrence of set_stream_info_from_input_stream in hls_read_packet.

Re: [FFmpeg-devel] [PATCH 2/3 v2] avformat/hls: Fix probing mpegts audio streams that use probing

2016-11-06 Thread Andreas Cadhalpun
On 06.11.2016 22:44, Anssi Hannula wrote: > Commit 04964ac311abe670f ("avformat/hls: Fix missing streams in some > cases with MPEG TS") caused a regression where subdemuxer streams that > use probing (e.g. dts/eac3/mp2 in mpegts) no longer get probed properly. > > This is because the codec paramet

Re: [FFmpeg-devel] [PATCH 1/3] avformat/hls: Factor copying stream info to a separate function

2016-11-06 Thread Andreas Cadhalpun
On 06.11.2016 22:44, Anssi Hannula wrote: > Signed-off-by: Anssi Hannula > --- > > libavformat/hls.c | 18 +++--- > 1 file changed, 11 insertions(+), 7 deletions(-) > > diff --git a/libavformat/hls.c b/libavformat/hls.c > index 3c09dd8..6fb652c 100644 > --- a/libavformat/hls.c > +++

Re: [FFmpeg-devel] [PATCH] mxfdec: fix NULL pointer dereference

2016-11-05 Thread Andreas Cadhalpun
On 05.11.2016 02:09, Michael Niedermayer wrote: > On Sat, Nov 05, 2016 at 12:20:21AM +0100, Andreas Cadhalpun wrote: >> Metadata streams have priv_data set to NULL. >> >> Signed-off-by: Andreas Cadhalpun >> --- >> libavformat/mxfdec.c | 2 +- >> 1 f

Re: [FFmpeg-devel] [libav-devel] [PATCH] lzf: update pointer p after realloc

2016-11-05 Thread Andreas Cadhalpun
On 05.11.2016 01:36, Luca Barbato wrote: > On 04/11/2016 23:33, Andreas Cadhalpun wrote: >> This fixes heap-use-after-free detected by AddressSanitizer. >> >> Signed-off-by: Andreas Cadhalpun >> --- >> libavcodec/lzf.c | 2 ++ >> 1 file changed, 2 inse

Re: [FFmpeg-devel] [PATCH 2/2] avformat/hls: Fix probing mpegts audio streams that use probing

2016-11-05 Thread Andreas Cadhalpun
On 05.11.2016 18:47, Andreas Cadhalpun wrote: > On 05.11.2016 17:39, Anssi Hannula wrote: >> @@ -1981,6 +1986,11 @@ static int hls_read_packet(AVFormatContext *s, >> AVPacket *pkt) >> >> pls->ctx->streams[

Re: [FFmpeg-devel] [PATCH 2/2] avformat/hls: Fix probing mpegts audio streams that use probing

2016-11-05 Thread Andreas Cadhalpun
On 05.11.2016 17:39, Anssi Hannula wrote: > Commit 04964ac311abe670f ("avformat/hls: Fix missing streams in some > cases with MPEG TS") caused a regression where subdemuxer streams that > use probing (e.g. dts/eac3/mp2 in mpegts) no longer get probed properly. > > This is because the codec paramet

Re: [FFmpeg-devel] [PATCH 1/2] avformat/hls: Factor copying stream info to a separate function

2016-11-05 Thread Andreas Cadhalpun
On 05.11.2016 17:38, Anssi Hannula wrote: > Signed-off-by: Anssi Hannula > --- > libavformat/hls.c | 18 +++--- > 1 file changed, 11 insertions(+), 7 deletions(-) > > diff --git a/libavformat/hls.c b/libavformat/hls.c > index 3c09dd8..6fb652c 100644 > --- a/libavformat/hls.c > +++ b/

[FFmpeg-devel] [PATCH] mxfdec: fix NULL pointer dereference

2016-11-04 Thread Andreas Cadhalpun
Metadata streams have priv_data set to NULL. Signed-off-by: Andreas Cadhalpun --- libavformat/mxfdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index d2166ee..a1a79ce 100644 --- a/libavformat/mxfdec.c +++ b/libavformat

[FFmpeg-devel] [PATCH] lzf: update pointer p after realloc

2016-11-04 Thread Andreas Cadhalpun
This fixes heap-use-after-free detected by AddressSanitizer. Signed-off-by: Andreas Cadhalpun --- libavcodec/lzf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/lzf.c b/libavcodec/lzf.c index 409a7ff..5b7526e 100644 --- a/libavcodec/lzf.c +++ b/libavcodec/lzf.c @@ -53,6 +53,7

[FFmpeg-devel] [PATCH] flvdec: set need_context_update when changing codec id

2016-11-04 Thread Andreas Cadhalpun
Otherwise the codec context and codecpar might disagree on the codec id, triggering asserts in av_parser_parse2. Signed-off-by: Andreas Cadhalpun --- libavformat/flvdec.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/libavformat/flvdec.c b/libavformat

[FFmpeg-devel] [PATCH] oggparsetheora: set need_context_update when changing codec id

2016-11-04 Thread Andreas Cadhalpun
Otherwise the codec context and codecpar might disagree on the codec id, triggering asserts in av_parser_parse2. Signed-off-by: Andreas Cadhalpun --- libavformat/oggparsetheora.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c

Re: [FFmpeg-devel] [PATCH 1/3] diracdec: use correct buffer for slice_params_buf realloc

2016-11-04 Thread Andreas Cadhalpun
On 04.11.2016 20:07, Rostislav Pehlivanov wrote: > On 4 November 2016 at 18:10, Andreas Cadhalpun < > andreas.cadhal...@googlemail.com> wrote: > >> This fixes a double-free detected by AddressSanitizer. >> >> The problem was introduced in commit >> d

[FFmpeg-devel] [PATCH 3/3] diracdec: check return code of get_buffer_with_edge

2016-11-04 Thread Andreas Cadhalpun
If it fails, buffers aren't allocated, causing NULL pointer dereferencing. Signed-off-by: Andreas Cadhalpun --- libavcodec/diracdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index bb314d0..e0604af 100644

[FFmpeg-devel] [PATCH 2/3] diracdec: clear slice_params_num_buf on allocation failure

2016-11-04 Thread Andreas Cadhalpun
Otherwise it can be non-zero next time decode_lowdelay is called, causing slice_params_buf not to be allocated, leading to a NULL pointer dereference. The problem was introduced in commit dcad4677d637cd2f701917e38361fa96b8c9a418. Signed-off-by: Andreas Cadhalpun --- libavcodec/diracdec.c | 1

[FFmpeg-devel] [PATCH 1/3] diracdec: use correct buffer for slice_params_buf realloc

2016-11-04 Thread Andreas Cadhalpun
This fixes a double-free detected by AddressSanitizer. The problem was introduced in commit dcad4677d637cd2f701917e38361fa96b8c9a418. Signed-off-by: Andreas Cadhalpun --- libavcodec/diracdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/diracdec.c b

Re: [FFmpeg-devel] [PATCH] avcodec/ac3dec: Check expacc

2016-11-03 Thread Andreas Cadhalpun
On 03.11.2016 11:30, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer > --- > libavcodec/ac3dec.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c > index a95c204..499971a 100644 > --- a/libavcodec/ac3dec.c > +++ b/libavcodec/a

Re: [FFmpeg-devel] [PATCH] avformat: close parser if codec changed

2016-11-03 Thread Andreas Cadhalpun
On 03.11.2016 11:07, Michael Niedermayer wrote: > On Thu, Nov 03, 2016 at 01:04:21AM +0100, Andreas Cadhalpun wrote: >> Yes, but it's not clear that the parser internal state is still correct >> after a change of the codec id. > > what exact case are we talking

Re: [FFmpeg-devel] [PATCH] avformat/apngenc: use the stream parameters extradata if no updated one is made available

2016-11-03 Thread Andreas Cadhalpun
On 03.11.2016 20:03, James Almer wrote: > On 11/3/2016 4:00 PM, Andreas Cadhalpun wrote: >> On 03.11.2016 19:53, Hendrik Leppkes wrote: >>> Since you want docs, I even found one extremely specific to this >>> particular case: >>> https://ffmpeg.org/ffmpeg-fo

Re: [FFmpeg-devel] [PATCH] avformat/apngenc: use the stream parameters extradata if no updated one is made available

2016-11-03 Thread Andreas Cadhalpun
On 03.11.2016 19:53, Hendrik Leppkes wrote: > Since you want docs, I even found one extremely specific to this > particular case: > https://ffmpeg.org/ffmpeg-formats.html#apng > > "All headers, but the PNG signature, up to (but not including) the > first fcTL chunk are transmitted as extradata." >

Re: [FFmpeg-devel] [PATCH] avformat/apngenc: use the stream parameters extradata if no updated one is made available

2016-11-03 Thread Andreas Cadhalpun
On 03.11.2016 09:52, Hendrik Leppkes wrote: > Hence my point about trying to stick to a common behavior scheme > without looking at what *OUR* decoder needs - there could be others, > after all. > Its common to write extradata into codecpar if its present. You can > try to dispute that as long as y

Re: [FFmpeg-devel] [PATCH] hls: call avformat_find_stream_info for mpegts subdemuxer

2016-11-03 Thread Andreas Cadhalpun
Hi, On 03.11.2016 11:18, Anssi Hannula wrote: > Andreas Cadhalpun kirjoitti 2016-11-03 02:12: >> This fixes probing dts/eac3/mp2 in hls. >> >> The problem was introduced in commit >> 04964ac311abe670fb3b60290a330f2067544b13. >> >> Also update the fate r

Re: [FFmpeg-devel] [PATCH] ppc: pixblockdsp: do unaligned block accesses correctly again

2016-11-02 Thread Andreas Cadhalpun
On 02.11.2016 23:41, Carl Eugen Hoyos wrote: > 2016-11-02 21:34 GMT+01:00 Andreas Cadhalpun > : >> This was broken by the following Libav commit: >> 4c387c7 ppc: dsputil: do unaligned block accesses correctly >> >> The following tests fail due to this: >> fate-

Re: [FFmpeg-devel] [PATCH] hls: always call avformat_find_stream_info for subdemuxers

2016-11-02 Thread Andreas Cadhalpun
On 27.10.2016 22:31, Andreas Cadhalpun wrote: > On 27.10.2016 21:30, Hendrik Leppkes wrote: >> On Thu, Oct 27, 2016 at 9:20 PM, Andreas Cadhalpun >> wrote: >>> This fixes probing dts/eac3/mp2 in hls. >>> >>> This partly reverts commit 04964ac311abe6

[FFmpeg-devel] [PATCH] hls: call avformat_find_stream_info for mpegts subdemuxer

2016-11-02 Thread Andreas Cadhalpun
This fixes probing dts/eac3/mp2 in hls. The problem was introduced in commit 04964ac311abe670fb3b60290a330f2067544b13. Also update the fate reference for the fate-segment-mp4-to-ts test. Signed-off-by: Andreas Cadhalpun --- I've no idea why the fate reference changes, but this also ha

Re: [FFmpeg-devel] [PATCH] avformat: close parser if codec changed

2016-11-02 Thread Andreas Cadhalpun
On 03.11.2016 00:42, Michael Niedermayer wrote: > On Wed, Nov 02, 2016 at 10:30:30PM +0100, Andreas Cadhalpun wrote: >> On 02.11.2016 13:07, Michael Niedermayer wrote: >>> On Sat, Oct 22, 2016 at 01:16:00AM +0200, Andreas Cadhalpun wrote: >>>> utils.c | 12 +++

Re: [FFmpeg-devel] [PATCH 01/12] adxdec: validate sample_rate

2016-11-02 Thread Andreas Cadhalpun
On 26.10.2016 21:44, Andreas Cadhalpun wrote: > On 26.10.2016 20:15, Paul B Mahol wrote: >> On 10/25/16, Michael Niedermayer wrote: >>> On Tue, Oct 25, 2016 at 07:45:25PM +0200, Andreas Cadhalpun wrote: >>>> On 25.10.2016 12:58, Paul B Mahol wrote: >>>>&

Re: [FFmpeg-devel] [PATCH] avformat: close parser if codec changed

2016-11-02 Thread Andreas Cadhalpun
On 02.11.2016 13:07, Michael Niedermayer wrote: > On Sat, Oct 22, 2016 at 01:16:00AM +0200, Andreas Cadhalpun wrote: >> utils.c | 12 >> 1 file changed, 12 insertions(+) >> ffefc22756b774cb7652587207ae66cfbf681be3 >> 0001-avformat-close-parser-if-

<    1   2   3   4   5   6   7   8   9   10   >