From c1c047f8d667d91d7adc919dfbf3b2e10f3907ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Mon, 8 Jun 2026 01:21:04 +0200 Subject: [PATCH] stream/lavf: check child_next return value before dereference --- stream/stream_lavf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream/stream_lavf.c b/stream/stream_lavf.c index 868f227cc7..d32640ea0f 100644 --- a/stream/stream_lavf.c +++ b/stream/stream_lavf.c @@ -126,7 +126,7 @@ static int control(stream_t *s, int cmd, void *arg) // This usually yields the URLContext (why does it even exist?), // which holds the name of the actual protocol implementation. void *child = avio->av_class->child_next(avio, NULL); - AVClass *cl = *(AVClass **)child; + AVClass *cl = child ? *(AVClass **)child : NULL; if (cl && cl->item_name) proto = cl->item_name(child); }