[FFmpeg-devel] [PATCH 3/4] proresenc_kostya: realloc if buffer too small

Michael Niedermayer michaelni at gmx.at
Tue Aug 19 00:30:17 CEST 2014


On Thu, Aug 14, 2014 at 12:03:25PM +0200, Christophe Gisquet wrote:
> Hi,
> 
> 2014-08-12 12:44 GMT+02:00 Christophe Gisquet <christophe.gisquet at gmail.com>:
> > Forgot a parameter to the call to avpriv_request_sample, will be added later.
> 
> If there's no further comment on this option for the reallocation,
> here's an updated patch.
> 
> -- 
> Christophe

>  proresenc_kostya.c |   37 ++++++++++++++++++++++++++++++++++++-
>  1 file changed, 36 insertions(+), 1 deletion(-)
> 403c44b2dadd7bc81072bea4252519daed260dc3  0001-proresenc_kostya-realloc-if-buffer-too-small.patch
> From 4ea51dc2cec915ce4c84db92febd8960bb44b650 Mon Sep 17 00:00:00 2001
> From: Christophe Gisquet <christophe.gisquet at gmail.com>
> Date: Mon, 11 Aug 2014 19:37:39 +0200
> Subject: [PATCH 1/2] proresenc_kostya: realloc if buffer too small
> 
> The buffer allocation may be incorrect (e.g. with an alpha plane),
> and currently causes the buffer to be set to NULL by init_put_bits,
> later on causing crashing.
> 
> So, detect that situation, and if detected, reallocate the buffer
> and ask a sample if it happens.
> 
> Fixes ticket #2760
> ---
>  libavcodec/proresenc_kostya.c | 37 ++++++++++++++++++++++++++++++++++++-
>  1 file changed, 36 insertions(+), 1 deletion(-)

a variant of this was merged

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140819/7515bbdd/attachment.asc>


More information about the ffmpeg-devel mailing list