From 63623611cef63b73948eea76042a844308e73dd1 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Tue, 5 Nov 2024 14:38:11 +0100 Subject: [PATCH] notification: Always set error in the failure case --- src/notification.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/notification.c b/src/notification.c index 38494dad8..63615c7ff 100644 --- a/src/notification.c +++ b/src/notification.c @@ -806,7 +806,13 @@ parse_serialized_sound (GVariantBuilder *builder, } if (!xdp_validate_sound (sealed_sound)) - return FALSE; + { + g_set_error_literal (error, + XDG_DESKTOP_PORTAL_ERROR, + XDG_DESKTOP_PORTAL_ERROR_INVALID_ARGUMENT, + "Invalid sound: The sound data is invalid"); + return FALSE; + } fd_sound = xdp_sealed_fd_to_handle (sealed_sound, out_fd_list,