[PATCH] check whether referenced PPS exists (fixes #393)
authorDirk Farin <dirk.farin@gmail.com>
Sat, 4 Mar 2023 09:32:43 +0000 (10:32 +0100)
committerThorsten Alteholz <debian@alteholz.de>
Fri, 29 Dec 2023 22:03:02 +0000 (23:03 +0100)
Gbp-Pq: Name CVE-2023-27102.patch

libde265/decctx.cc

index 8881c0cbb4d51b3d11e4d88665da33bcee4f8bfc..3eb5daa5f9761a35597ade31a58944769295abca 100644 (file)
@@ -2276,9 +2276,10 @@ bool decoder_context::process_slice_segment_header(slice_segment_header* hdr,
   // get PPS and SPS for this slice
 
   int pps_id = hdr->slice_pic_parameter_set_id;
-  if (pps[pps_id]->pps_read==false) {
+  if (pps[pps_id]==nullptr || pps[pps_id]->pps_read==false) {
     logerror(LogHeaders, "PPS %d has not been read\n", pps_id);
-    assert(false); // TODO
+    img->decctx->add_warning(DE265_WARNING_NONEXISTING_PPS_REFERENCED, false);
+    return false;
   }
 
   current_pps = pps[pps_id];