OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ef2f4f
)
lavc/vda_h264_dec.c Fix NULL pointer dereference
author
Pavel Koshevoy
<pkoshevoy@gmail.com>
Fri, 10 Feb 2017 03:20:14 +0000
(20:20 -0700)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Thu, 16 Feb 2017 12:20:27 +0000
(13:20 +0100)
ps.sps_list entries may be NULL, so check before dereferencing
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/vda_h264_dec.c
patch
|
blob
|
history
diff --git
a/libavcodec/vda_h264_dec.c
b/libavcodec/vda_h264_dec.c
index
92839e2
..
972bd6b
100644
(file)
--- a/
libavcodec/vda_h264_dec.c
+++ b/
libavcodec/vda_h264_dec.c
@@
-226,7
+226,7
@@
static av_cold int vdadec_init(AVCodecContext *avctx)
ctx->h264_initialized = 1;
for (i = 0; i < MAX_SPS_COUNT; i++) {
- const SPS *sps =
(const SPS*)ctx->h264ctx.ps.sps_list[i]->data
;
+ const SPS *sps =
ctx->h264ctx.ps.sps_list[i] ? (const SPS*)ctx->h264ctx.ps.sps_list[i]->data : NULL
;
if (sps && (sps->bit_depth_luma != 8 ||
sps->chroma_format_idc == 2 ||
sps->chroma_format_idc == 3)) {