Backport upstream fix for CVE-2026-58013 from MR !5170. The fix
prevents a memcmp() from reading past the end of the GString
buffer when using a multi-byte line terminator in GIOChannel.
The patch also includes a unit test for the fix. An additional
#include <stdint.h> was added to the test file to ensure
compatibility with glib 2.80.4 headers.
CVE: CVE-2026-58013
Upstream patches:
- https://gitlab.gnome.org/GNOME/glib/-/merge_requests/5170.patch
Resolves: RHEL-212239
This commit was backported by Ymir, a Red Hat Enterprise Linux software maintenance AI agent.
Assisted-by: Ymir