[FFmpeg-devel] [PATCH 2/3] wavpackenc: report too small buffer

Michael Niedermayer michaelni at gmx.at
Thu Aug 21 18:06:31 CEST 2014


On Thu, Aug 21, 2014 at 02:32:46PM +0200, Christophe Gisquet wrote:
> Hi,
> 
> 2014-08-19 18:28 GMT+02:00 Christophe Gisquet <christophe.gisquet at gmail.com>:
> > 2014-08-19 16:20 GMT+02:00 Nicolas George <george at nsup.org>:
> >> IMHO, the correct error depends on how sure you are that a buffer too small
> >> SHOULD not happen.
> >>
> >> If you are very sure, then av_assert0().
> >
> > That would be it: I'm sure that, if the condition occurs and the
> > packet is written anyway, the file will be incorrect.
> 
> Anyway, that should never occur, so here's a version with av_assert0.
> 
> -- 
> Christophe

>  wavpackenc.c |    2 ++
>  1 file changed, 2 insertions(+)
> 04628a0ec235881d99b91fda00ddebb79dbc340d  0001-wavpackenc-assert-on-too-small-buffer.patch
> From ae8998602fa0d9114a09291c4623a1609a5fcb8c Mon Sep 17 00:00:00 2001
> From: Christophe Gisquet <christophe.gisquet at gmail.com>
> Date: Tue, 19 Aug 2014 14:05:56 +0200
> Subject: [PATCH] wavpackenc: assert on too small buffer
> 
> bytestream2_* will not cause buffer overflow, but in that case, this means
> the allocation would be incorrect and the encoded result invalid. Therefore,
> assert no overflow occurred.

applied

thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- 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/20140821/ea7c66fd/attachment.asc>


More information about the ffmpeg-devel mailing list