So the introspection tests which check architecture-specific things are
run on an i386 architecture. This gives the best check we have that the
libgirepository code is actually architecture independent.
This requires adding some missing dependencies to the Debian Dockerfile
which gobject-introspection.git needs. It also means enabling `sudo` on
those containers.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This effectively reverts commit 663ee11fda
for this `meson.build` file. This `meson.build` file isn’t actually
pulled into the main GLib (or GIO) build; it’s actually just installed
and then later called from a `meson` subprocess of `static-link.py`.
So it doesn’t have access to the `app_profile_dep` variable, which is
internal to GLib.
Fixes this CI failure: https://gitlab.gnome.org/GNOME/glib/-/jobs/5834610
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Since this list was originally created, more file system types have
become commonly used and would benefit from being marked as a system
file-system type.
This was found while tracking down some performance issues in
gnome-settings-daemon trash handling.
The code assumes that find_dbus_process_path() will return a wide
character string that is no longer than MAX_PATH. But this might not be
guaranteed to be true.
This was flagged in #YWH-PGM9867-119. The vulnerability hunter failed to
find any way to reach this code, so maybe it's not actually possible,
but we might as well check the size to be safe.
Verify that stderr is not fully-buffered.
CRTs before the Unversal CRT can open stderr in full buffering
mode (depending on the output type). That's not desirable and
we have a workaround in app_profile_dep.
`SHFileOperationW()` may not always return success in case of
user-aborted operation, `ERROR_CANCELLED` was also observed
when cancelling a move-to-recycle-bin confirmation dialog.
Ensure `G_IO_ERROR_CANCELLED` is properly reported to the application,
instead of the generic `G_IO_ERROR_FAILED`.
Re-use rules from https://gitlab.gnome.org/GNOME/citemplates/ default-rules
template, but without importing them to ensure that changes in the
citemplates project won't affect us directly
So we have some basic control on what should trigger a workflow,
auto-retry and auto-replace on subsequent pushes
Make g_enum_get_value_by_name(), g_flags_get_value_by_name(),
g_enum_get_value_by_nick() and g_flags_get_value_by_nick() perform ASCII
case-insensitive comparisons when matching names and nicks. This aligns
behavior with common expectations for user-visible nicks and reduces
rejections of mixed-case inputs.
Implementation switches from strcmp() to strcmp_ignore_case() when
comparing the provided name/nick to registered values.
This is a minor behavior change that only broadens accepted input. Types
with values that differ only by case are now allowed.
Tests: Extend gobject/tests/enums.c to cover mixed-case lookups for both
enums and flags (names and nicks).
Fixes: #74
`filename` should always be absolute when it's passed to `faccessat` so
this shouldn't change the behavior.
Apparently NetBSD checks the value of `dirfd` even when `pathname` is
absolute which results in an error:
https://gitlab.gnome.org/GNOME/glib/-/issues/3495#note_2605408
Many libc implementations seem to be incompatible with this
optimisation.
Printing an error when the error is either `EINVAL` or `EBADF` should
make it easier to identify any more problematic platforms.
These functions could be called on untrusted input data, and since they
do URI escaping/unescaping, they have non-trivial string handling code.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
See: #3827
If the string to escape contains a very large number of unacceptable
characters (which would need escaping), the calculation of the length of
the escaped string could overflow, leading to a potential write off the
end of the newly allocated string.
In addition to that, the number of unacceptable characters was counted
in a signed integer, which would overflow to become negative, making it
easier for an attacker to craft an input string which would cause an
out-of-bounds write.
Fix that by validating the allocation length, and using an unsigned
integer to count the number of unacceptable characters.
Spotted by treeplus. Thanks to the Sovereign Tech Resilience programme
from the Sovereign Tech Agency. ID: #YWH-PGM9867-134
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Fixes: #3827
match
This expands on the previous fixes to the kqueue backend testing, to
always treat `CHANGES_DONE_HINT` as optional when there is a mismatch
checking the expected events.
Also re-enable the tests for macOS.
Helps: #1392
This is to avoid the Wflag-enum warning that Clang emits when you have a
flags enum where a multi-bit value encompasses a bit that doesn't have a
corresponding single-bit value.
(I'm not sure why G_REGEX_NEWLINE_ANYCRLF isn't just 1 << 22...)
This is to avoid the Wflag-enum warning that Clang emits when you have a
flags enum where a multi-bit value encompasses a bit that doesn't have a
corresponding single-bit value.