Fix D-Bus disconnection when an object path was overly long
This commit is contained in:
parent
b1955b29a1
commit
05fbf4c6ae
@ -0,0 +1,37 @@
|
|||||||
|
From dea3530414f8d118e64f8ae408eb19f479abc082 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bastien Nocera <hadess@hadess.net>
|
||||||
|
Date: Thu, 20 Jul 2023 14:48:41 +0200
|
||||||
|
Subject: [PATCH] flatpak-proxy: Fix D-Bus disconnection with overly long
|
||||||
|
object paths
|
||||||
|
|
||||||
|
According to the D-Bus specifications:
|
||||||
|
https://dbus.freedesktop.org/doc/dbus-specification.html#id-1.4.4
|
||||||
|
For the STRING and OBJECT_PATH types, [the data length] is encoded in 4
|
||||||
|
bytes (a UINT32).
|
||||||
|
|
||||||
|
But the code was trying to parse the 32-bit integer as an 8-bit one,
|
||||||
|
meaning that, as was the case with object paths created by the dLeyna
|
||||||
|
project, a 259-byte long string would be parsed like a 3-byte long
|
||||||
|
one.
|
||||||
|
|
||||||
|
Fixes: 004b7b2ca0e9 ("Parse dbus headers") in flatpak
|
||||||
|
---
|
||||||
|
flatpak-proxy.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/flatpak-proxy.c b/flatpak-proxy.c
|
||||||
|
index 48781560c8bc..47e51df3df40 100644
|
||||||
|
--- a/flatpak-proxy.c
|
||||||
|
+++ b/flatpak-proxy.c
|
||||||
|
@@ -1116,7 +1116,7 @@ get_signature (Buffer *buffer, guint32 *offset, guint32 end_offset)
|
||||||
|
static const char *
|
||||||
|
get_string (Buffer *buffer, Header *header, guint32 *offset, guint32 end_offset)
|
||||||
|
{
|
||||||
|
- guint8 len;
|
||||||
|
+ guint32 len;
|
||||||
|
char *str;
|
||||||
|
|
||||||
|
*offset = align_by_4 (*offset);
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: xdg-dbus-proxy
|
Name: xdg-dbus-proxy
|
||||||
Version: 0.1.4
|
Version: 0.1.4
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Filtering proxy for D-Bus connections
|
Summary: Filtering proxy for D-Bus connections
|
||||||
|
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
@ -17,6 +17,9 @@ BuildRequires: /usr/bin/xsltproc
|
|||||||
|
|
||||||
Requires: dbus
|
Requires: dbus
|
||||||
|
|
||||||
|
# https://github.com/flatpak/xdg-dbus-proxy/pull/50
|
||||||
|
Patch0: 0001-flatpak-proxy-Fix-D-Bus-disconnection-with-overly-lo.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
xdg-dbus-proxy is a filtering proxy for D-Bus connections. It was originally
|
xdg-dbus-proxy is a filtering proxy for D-Bus connections. It was originally
|
||||||
part of the flatpak project, but it has been broken out as a standalone module
|
part of the flatpak project, but it has been broken out as a standalone module
|
||||||
@ -38,6 +41,9 @@ to facilitate using it in other contexts.
|
|||||||
%{_mandir}/man1/xdg-dbus-proxy.1*
|
%{_mandir}/man1/xdg-dbus-proxy.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 19 2023 Bastien Nocera <bnocera@redhat.com> - 0.1.4-2
|
||||||
|
- Fix D-Bus disconnection when an object path was overly long
|
||||||
|
|
||||||
* Wed Jul 19 2023 Bastien Nocera <bnocera@redhat.com> - 0.1.4-1
|
* Wed Jul 19 2023 Bastien Nocera <bnocera@redhat.com> - 0.1.4-1
|
||||||
- Update to 0.1.4
|
- Update to 0.1.4
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user