ui/dbus: fix buffer-overflow detected by ASAN
commitfc94d1159c8c8da6105cd2beb11c1f24746a2d07
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 22 Dec 2021 14:40:32 +0000 (22 18:40 +0400)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 13 Jan 2022 09:48:43 +0000 (13 10:48 +0100)
treec9b384945b53da9d4978fb15ed4b85d14437b06a
parentecd5f2882fdd10f798984eb52abd00ffc78c2ef7
ui/dbus: fix buffer-overflow detected by ASAN

On the last added dbus patch, I left a tiny BO:

==441487==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x611000025a70 at pc 0x7f0817bb764c bp 0x7ffde672ae60 sp 0x7ffde672ae58
WRITE of size 8 at 0x611000025a70 thread T0
    #0 0x7f0817bb764b in dbus_vc_class_init ../ui/dbus.c:401

A cookie for ASAN! not you C :)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Fixes: 7f767ca35e5 ("ui/dbus: register D-Bus VC handler")
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211222144032.443424-1-marcandre.lureau@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/dbus.c