upower/libupower-glib
Kate Hsuan 09a8e63bae libupower-glib: up-client: Verify the UpClient pointer when invoking the API
Passing a NULL UpClient to up_client_get_devices2() led to the following
error message and crash since up_client_get_devices_full() returned
immediately, without properly setting up a GError with an error message.

The input UpClient pointer verification was moved from the internal
function to the API entry to ensure only a valid UpClient is passed
to the internal function. Moreover, GError will be properly set by the
GLib dbus APIs and the internal function.

(upower:21076): libupower-glib-CRITICAL **: 16:33:53.919: up_client_get_devices_full: assertion 'UP_IS_CLIENT (client)' failed
Segmentation fault         (core dumped) ./upower -d

Related: https://gitlab.freedesktop.org/upower/upower/-/merge_requests/296

Reported-by: Mathias Krause <minipli@grsecurity.net>
Signed-off-by: Kate Hsuan <hpa@redhat.com>
2026-02-03 21:42:03 +08:00
..
meson.build Remove Wakeups API 2022-03-24 17:02:27 +01:00
up-autocleanups.h Remove Wakeups API 2022-03-24 17:02:27 +01:00
up-client.c libupower-glib: up-client: Verify the UpClient pointer when invoking the API 2026-02-03 21:42:03 +08:00
up-client.h Revert "lib: Mark lid related functions and properties as deprecated" 2026-01-06 14:26:16 +08:00
up-device.c lib: up-device: Expose historical voltage data 2026-01-05 12:39:13 +02:00
up-device.h Fix trailing white space and end of file 2025-01-08 14:01:34 +08:00
up-history-item.c Fix trailing white space and end of file 2025-01-08 14:01:34 +08:00
up-history-item.h Fix trailing white space and end of file 2025-01-08 14:01:34 +08:00
up-stats-item.c Fix trailing white space and end of file 2025-01-08 14:01:34 +08:00
up-stats-item.h Fix trailing white space and end of file 2025-01-08 14:01:34 +08:00
up-types.c lib: Add UP_DEVICE_KIND_BLUETOOTH_GENERIC type 2021-06-17 13:47:33 +02:00
up-types.h Fix trailing white space and end of file 2025-01-08 14:01:34 +08:00
up-version.h.in lib: Use @see_also instead of "See also" 2018-09-30 19:19:02 +02:00
upower.h Fix trailing white space and end of file 2025-01-08 14:01:34 +08:00