[vlc-commits] codec: hxxx_helper: fix null-deref when the SPS is not yet parsed

Thomas Guillem git at videolan.org
Mon Feb 12 13:12:53 CET 2018


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Feb 12 13:10:44 2018 +0100| [57de111fb0c8a3a46af4f5c7a9ff0b6692a33969] | committer: Thomas Guillem

codec: hxxx_helper: fix null-deref when the SPS is not yet parsed

Crash introduced by 1b7e1c4bfcda375e2d4e657135aeaf3732e44af2

(cherry picked from commit 48cdd917f5c23f87b4313b2a8dd9602f703a134a)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=57de111fb0c8a3a46af4f5c7a9ff0b6692a33969
---

 modules/codec/hxxx_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/hxxx_helper.c b/modules/codec/hxxx_helper.c
index 37bdff7719..1ff27db011 100644
--- a/modules/codec/hxxx_helper.c
+++ b/modules/codec/hxxx_helper.c
@@ -923,7 +923,7 @@ hxxx_helper_get_current_profile_level(const struct hxxx_helper *hh,
     else if(hh->i_codec == VLC_CODEC_HEVC)
     {
         const struct hxxx_helper_nal *hsps = &hh->hevc.sps_list[hh->hevc.i_current_sps];
-        if (hsps &&
+        if (hsps && hsps->hevc_sps &&
             hevc_get_sps_profile_tier_level(hsps->hevc_sps, p_profile, p_level))
             return VLC_SUCCESS;
     }



More information about the vlc-commits mailing list