thanks, committed.
On 2026/11/15 23:18, Ryan Freeman wrote:
> Hello,
>
> After the update to icecast-2.5.0, I'm observing a segmentation fault
> every time a track changes on the input stream. audio/mpd is used to
> stream opus (or vorbis) audio. The issue was reported upstream by
> another party:
> https://gitlab.xiph.org/xiph/icecast-server/-/work_items/2528
>
> The crash occurs when mpd sends metadata information during track
> changes while streaming to icecast.
>
> Applying the fix committed upstream** solves the issue for me, tested
> successfully on OpenBSD 8.0/amd64 with both vorbis and opus stream
> formats.
>
> **
> https://gitlab.xiph.org/xiph/icecast-server/-/commit/f5b22be8980a1d0c605c8db6dfc20cc0a316b663
>
> This patch was created on current ports, tested build+ran ok on
> -current. Built the package with the same patch on OPENBSD_8_0
> ports tree on -stable build host for my radio stream.
>
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/net/icecast/Makefile,v
> diff -u -p -r1.78 Makefile
> --- Makefile 26 Aug 2026 12:16:29 -0000 1.78
> +++ Makefile 16 Nov 2026 05:39:39 -0000
> @@ -2,7 +2,7 @@ COMMENT= server for streaming various me
> CATEGORIES= net audio
>
> DISTNAME= icecast-2.5.0
> -REVISION= 0
> +REVISION= 1
>
> HOMEPAGE= https://icecast.org/
>
> Index: patches/patch-src_event_stream_c
> ===================================================================
> RCS file: patches/patch-src_event_stream_c
> diff -N patches/patch-src_event_stream_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_event_stream_c 16 Nov 2026 05:39:39 -0000
> @@ -0,0 +1,21 @@
> +Fix: Do not write NULL values to JSON renderer, gitlab f5b22be8
> +
> +fixes icecast crashing when mpd feeds opus or vorbis metadata
> +changes at track boundaries.
> +
> +Index: src/event_stream.c
> +--- src/event_stream.c.orig
> ++++ src/event_stream.c
> +@@ -559,7 +559,11 @@ static void event_stream_event_render(event_stream_eve
> + json_renderer_begin(json, JSON_ELEMENT_TYPE_ARRAY);
> + for (size_t i = 0; i < keys[j].count; i++) {
> + const char *value = vorbis_comment_query(event->vc,
> name, i);
> +- json_renderer_write_string(json, value,
> JSON_RENDERER_FLAGS_NONE);
> ++ if (!value) {
> ++ ICECAST_LOG_WARN("Vorbis key without value: %#H",
> name);
> ++ } else {
> ++ json_renderer_write_string(json, value,
> JSON_RENDERER_FLAGS_NONE);
> ++ }
> + }
> + json_renderer_end(json);
> + }
>