[FFmpeg-devel] [PATCH 2/3] h264: ff_h264_decode_extradata: check that buf is not NULL
Michael Niedermayer
michaelni at gmx.at
Sat Sep 24 21:14:21 CEST 2011
On Sat, Sep 24, 2011 at 08:37:29PM +0200, Alexander Strasser wrote:
> ---
> libavcodec/h264.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libavcodec/h264.c b/libavcodec/h264.c
> index 6655749..1dea946 100644
> --- a/libavcodec/h264.c
> +++ b/libavcodec/h264.c
> @@ -995,7 +995,7 @@ int ff_h264_decode_extradata(H264Context *h, const uint8_t *buf, int size)
> {
> AVCodecContext *avctx = h->s.avctx;
>
> - if(size <= 0)
> + if(!buf || size <= 0)
> return -1;
obviously good and cant hurt to check, so LGTM
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110924/08401daa/attachment.asc>
More information about the ffmpeg-devel
mailing list