[PATCH] fixed #1893
authorjeanlf <jeanlf@gpac.io>
Mon, 30 Aug 2021 14:15:32 +0000 (16:15 +0200)
committerMoritz Mühlenhoff <jmm@debian.org>
Mon, 19 Jun 2023 21:46:06 +0000 (22:46 +0100)
Gbp-Pq: Name CVE-2021-40572.patch

src/media_tools/av_parsers.c

index 85668bb06b8a188e25ec793e1ff6d7222207c4ef..71bac7f0938d886e71819a793f24bc4c49e1da81 100644 (file)
@@ -3889,10 +3889,8 @@ void gf_av1_reset_state(AV1State *state, Bool is_destroy)
                gf_list_del(l1);
                gf_list_del(l2);
                if (state->bs) {
-                       if (gf_bs_get_position(state->bs)) {
-                               u32 size;
-                               gf_bs_get_content_no_truncate(state->bs, &state->frame_obus, &size, &state->frame_obus_alloc);
-                       }
+                       u32 size;
+                       gf_bs_get_content_no_truncate(state->bs, &state->frame_obus, &size, &state->frame_obus_alloc);
                        gf_bs_del(state->bs);
                }
                state->bs = NULL;