[FFmpeg-devel] [PATCH 2/3] nutdec: check chapter creation in decode_info_header

Michael Niedermayer michaelni at gmx.at
Tue Apr 28 22:33:53 CEST 2015


On Tue, Apr 28, 2015 at 08:57:59PM +0200, Andreas Cadhalpun wrote:
> This fixes a segmentation fault when accessing the metadata.
> 
> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
> ---
>  libavformat/nutdec.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
> index 46946d3..2049f70 100644
> --- a/libavformat/nutdec.c
> +++ b/libavformat/nutdec.c
> @@ -505,6 +505,10 @@ static int decode_info_header(NUTContext *nut)
>                                       nut->time_base[chapter_start %
>                                                      nut->time_base_count],
>                                       start, start + chapter_len, NULL);
> +        if (!chapter) {
> +            av_log(s, AV_LOG_ERROR, "could not create chapter\n");
> +            return AVERROR_ENOMEM;
> +        }

fixed typo
applied

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- 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/20150428/b3a556b8/attachment.asc>


More information about the ffmpeg-devel mailing list