[packages/libmpdclient] fix crash when song is missing new RealUri prop; rel 2

atler atler at pld-linux.org
Fri Jun 19 19:56:14 CEST 2026


commit b269bb15f4547bb863be6f157ae8d49b3feb65f6
Author: Jan Palus <atler at pld-linux.org>
Date:   Fri Jun 19 19:54:54 2026 +0200

    fix crash when song is missing new RealUri prop; rel 2

 libmpdclient.spec   |  4 +++-
 null-real-uri.patch | 12 ++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/libmpdclient.spec b/libmpdclient.spec
index 91c2e3a..33e8575 100644
--- a/libmpdclient.spec
+++ b/libmpdclient.spec
@@ -6,11 +6,12 @@ Summary:	MPD client library
 Summary(pl.UTF-8):	Biblioteka kliencka MPD
 Name:		libmpdclient
 Version:	2.25
-Release:	1
+Release:	2
 License:	BSD-like
 Group:		Libraries
 Source0:	https://www.musicpd.org/download/libmpdclient/2/%{name}-%{version}.tar.xz
 # Source0-md5:	9a10bca347652409120466140263060d
+Patch0:		null-real-uri.patch
 URL:		http://www.musicpd.org/doc/libmpdclient/
 BuildRequires:	doxygen
 BuildRequires:	gcc >= 6:4.6
@@ -55,6 +56,7 @@ Statyczna biblioteka kliencka MPD.
 
 %prep
 %setup -q
+%patch -P0 -p1
 
 %build
 %meson \
diff --git a/null-real-uri.patch b/null-real-uri.patch
new file mode 100644
index 0000000..714a364
--- /dev/null
+++ b/null-real-uri.patch
@@ -0,0 +1,12 @@
+--- libmpdclient-2.25/src/song.c.orig	2026-06-17 11:58:42.000000000 +0200
++++ libmpdclient-2.25/src/song.c	2026-06-19 19:50:40.377520115 +0200
+@@ -219,7 +219,8 @@ mpd_song_dup(const struct mpd_song *song
+ 		} while (src_tag != NULL);
+ 	}
+ 
+-	ret->real_uri = strdup(song->real_uri);
++	if (song->real_uri != NULL)
++		ret->real_uri = strdup(song->real_uri);
+ 	ret->duration = song->duration;
+ 	ret->duration_ms = song->duration_ms;
+ 	ret->start = song->start;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libmpdclient.git/commitdiff/b269bb15f4547bb863be6f157ae8d49b3feb65f6



More information about the pld-cvs-commit mailing list