subparse: Skip after the end of a valid closing tag instead of only skipping `<`
authorSebastian Dröge <sebastian@centricular.com>
Tue, 13 Jun 2023 09:58:26 +0000 (12:58 +0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 20 Jun 2023 09:23:07 +0000 (09:23 +0000)
This is a small optimization and avoids restarting the next parsing
iteration on already accepted data.

On its own it would also fix ZDI-CAN-20968 (see previous commit) but the
previous commit independently is also a valid fix for it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4898>

subprojects/gst-plugins-base/gst/subparse/gstsubparse.c

index d0960a9..b33ddbb 100644 (file)
@@ -794,6 +794,8 @@ subrip_fix_up_markup (gchar ** p_txt, gconstpointer allowed_tags_ptr)
         } else {
           --num_open_tags;
           g_ptr_array_remove_index (open_tags, num_open_tags);
+          cur = end_tag + 1;
+          continue;
         }
       }
     }