From 56451b0f1aabaeb25d4d00f3aa13502ab4acdc58 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Sat, 4 Jun 2022 17:23:00 +0200 Subject: [PATCH] rtmp2: Fix allocation of GstRtmpMeta Use the right size. On 64-bit platforms, `GstMetaInfo` is larger than `GstRtmpMeta`, which masked this bug. On 32-bit platforms, it causes crashes. Thanks to @maxatka for discovering this. Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1721 Part-of: --- subprojects/gst-plugins-bad/gst/rtmp2/rtmp/rtmpmessage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/gst/rtmp2/rtmp/rtmpmessage.c b/subprojects/gst-plugins-bad/gst/rtmp2/rtmp/rtmpmessage.c index f59c09a7da..d284cb3677 100644 --- a/subprojects/gst-plugins-bad/gst/rtmp2/rtmp/rtmpmessage.c +++ b/subprojects/gst-plugins-bad/gst/rtmp2/rtmp/rtmpmessage.c @@ -207,7 +207,7 @@ gst_rtmp_meta_get_info (void) if (g_once_init_enter (&rtmp_meta_info)) { const GstMetaInfo *meta = gst_meta_register (GST_RTMP_META_API_TYPE, - "GstRtmpMeta", sizeof *meta, gst_rtmp_meta_init, NULL, + "GstRtmpMeta", sizeof (GstRtmpMeta), gst_rtmp_meta_init, NULL, gst_rtmp_meta_transform); g_once_init_leave (&rtmp_meta_info, meta); }