| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
With version 2, we need to query the values explicitly.
The properties made this automatic.
|
|\
| |
| |
| |
| | |
Fix failing tests when G_MESSAGES_DEBUG is set (again)
See merge request GNOME/glib!247
|
| |
| |
| |
| |
| |
| | |
Similar issue was fixed with commit f929d148, but it's happening again.
Define G_MESSAGES_DEBUG=all when running CI to ensure we won't regress
anymore.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Resolve "the meson build doesn't support installed tests"
Closes #1444
See merge request GNOME/glib!245
|
| | | |
|
| |/ |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
gvdb: Fix error handling in gvdb_table_new()
Closes #1454
See merge request GNOME/glib!214
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The documentation was unclear about what error codes would be returned
on attempting to open an empty or corrupt GVDB file. Previous versions
of the documentation incorrectly said that corrupt GVDB files were
considered equivalent to empty ones.
A recent commit has clarified the documentation to include its error
handling behaviour.
Update the two users of GVDB within GLib, GResource and GSettingsSource,
to follow this change, and add unit tests for them both.
Other users of the GVDB copylib will need to update their copy and make
appropriate changes if they have bugs in their handling of this
situation. dconf is one example of this. GVDB should be updated from
https://gitlab.gnome.org/GNOME/gvdb.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/glib/issues/1454
|
| | |
| | |
| | |
| | |
| | |
| | | |
This should introduce no functional changes.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
This should introduce no functional changes.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
| |\ \
| | | |
| | | |
| | | | |
Minor merge conflicts in gvdb-reader.c with the documentation.
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is based on the commit 59a24ab5a3 in GLib.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
(This is based on commit 892fc2e4 from dconf.)
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
| | | |
| | | |
| | | |
| | | | |
https://bugzilla.gnome.org/show_bug.cgi?id=776504
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
glibc string.h declares memcpy() with attribute(nonnull(1,2)), causing
calls with NULL arguments to be treated as undefined behaviour.
This is consistent with ISO C99 and C11, which state that passing 0
to string functions as an array length does not remove the requirement
that the pointer to the array is a valid pointer.
gcc -fsanitize=undefined catches this while running OSTree's test suite.
Similarly, running the GLib test suite reports similar issues for
qsort(), memmove(), memcmp().
(This is a partial cherry-pick of commit e5ed410c8c0fe823883 from GLib.)
Signed-off-by: Simon McVittie <smcv@debian.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510
Reviewed-by: Colin Walters
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
GVDB is essentially part of GLib, so should have the same maintainer
list.
At least this way, it’s not just maintained by one absentee maintainer.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Drop gvdb_table_new_from_data() and add gvdb_table_new_from_bytes().
Since the underlying backingstore of a GvdbTable is now always
refcounted, drop the refcounting on GvdbTable itself.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The attempt at the simple method for preventing unbounded recursion
proved to be insufficient due to the existence of dconf databases in the
wild that violated the rule (leading to the entire content of the
database being scrapped). It also still had the ugly assert for less
than 64 levels of recursion that could have been hit by a determined
advisary.
gvdb_table_get_names() allows the dconf-service to do everything it
needs without the troubles associated with the walk approach.
|
| | | |
| | | |
| | | |
| | | | |
This function lists off all names that appear within a particular hash.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This was used to implement a much more complicated check which was
dismissed in favour of the simple 'must follow in file' approach.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Improve the robustness of gvdb-reader in two ways.
First: ensure that the result of gvdb_table_has_value() always agrees
with gvdb_table_get_value(). Those two could disagree in the case that
the value was recorded as existing but pointed to an out-of-bounds
region.
Second: prevent gvdb_table_walk() from getting stuck in finite loops due
to self-referential directories.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Clean up the logic for dealing with invalid headers and include the case
where the file is too small to contain a fully-formed header.
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
gspawn: Use fcntl() to work around systems which don’t support O_CLOEXEC
Closes #1488
See merge request GNOME/glib!242
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Somehow, we are still limping along with partial support for OS X
<10.7.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/glib/issues/1488
|
|\ \ \ \ \
| |_|_|_|/
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | | |
g_binding_unbind: make it more introspection friendly; allow calling it multiple times. Fixes #1373
Closes #1373
See merge request GNOME/glib!244
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
multiple times. Fixes #1373
g_object_bind_property() (transfer none) returns a GBinding with an existing internal
reference which is active as long as the "binding" is. This allows to optionally use
the binding without any memory management, as it will remove itself when it is no longer
needed.
There are currently three ways to remove the "binding" and as a result the reference:
1) Either the source or target dies and we get notified by a weakref callback
2) The user unrefs the binding until it is destroyed (which is semi-legal,
but worked and is used in the test suite)
3) The user calls g_binding_unbind()
In case (3) the problem was that it always calls unref even if the "binding" is already
gone, leading to crashes when called from bindings multiple times.
In #1373 and !197 it was noticed that a function always unrefs which would be a
"transfer full" annotation, but the problem here is that it should only remove the
ref when removing the "binding" and the annotation should stay "transfer none".
As a side effect of this fix it is now also possible to call g_binding_unbind() multiple
times where every call after the first is a no-op.
This also adds explicit tests for case (1) and (3) - only case (3) is affected by this change.
|
|/ / / / |
|
|\ \ \ \
| |_|/ /
|/| | |
| | | |
| | | |
| | | |
| | | | |
Fix trashing on overlayfs
Closes #1027
See merge request GNOME/glib!182
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In order to determine whether to trash a file to the home directory, we
compare its st_dev to our home directory's st_dev field.
This is the wrong thing to do on overlayfs when deleting files, because
st_dev contains the ID of the filesystem providing the file (which can
be the lower or upper filesystem), but directories always return the ID
of the overlayfs. Thus the comparison fails and we are unable to trash
the file.
Fix this by checking st_dev of the parent directory when we are deleting
a file.
Also adjust `test_trash_not_supported` for this - make its st_dev check
look at the parent directory's `st_dev` rather than the temporary file's
own.
Fixes #1027.
|
|/ / /
| | |
| | |
| | | |
This reverts commit 15cdcd2e0b4d18487dc71e3adc85e3bc8090058a.
|
| | |
| | |
| | | |
The range can have only a "min" or only a "max" attribute, and can even have no attributes at all.
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
tests: Explicitly set TZ=UTC for g_time_val_from_iso8601() testing
See merge request GNOME/glib!243
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some of the test vectors don’t specify a timezone, so the local one is
used; the comparisons to the expected results (which are in UTC) then
fail.
See discussion in
https://gitlab.gnome.org/GNOME/glib/merge_requests/225.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
|/| |
| | |
| | | |
glib-mkenums: forbid @filename@/@basename@ in fhead and ftail
See merge request GNOME/glib!241
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
ftail is not per-input-file, it is the footer for the entire output
file.
You cannot have fewer informations.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As discussed in
https://gitlab.gnome.org/GNOME/glib/merge_requests/135#note_253986 it
doesn't really make sense to support these outside the templates for any
particular header file. Leave them unsubstituted, with a warning.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Part of runMkenumsWithHeader() was duplicated in test_reproducible(),
and would otherwise need to be duplicated again in upcoming tests. Many
places duplicated decoding stdout/stderr and checking the exit code.
Introduce a named tuple for the returned fields; and factor out writing
a template file to pass with --template.
|
|\ \ \
| |/ /
|/| |
| | |
| | | |
gtimer: Ensure arithmetic is correctly signed for ISO 8601 parsing
See merge request GNOME/glib!240
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| | |
When calculating the value of a timezone offset, ensure that any offsets
done with negative numbers are done in a signed integer.
oss-fuzz#9815
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
gvariant: Fix bounds checking in GVariant text format parser
Closes #1481
See merge request GNOME/glib!236
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The token_stream_peek() functions were not doing any bounds checking, so
could potentially read 1 byte off the end of the input blob. This was
never noticed, since the input stream is almost always a nul-terminated
string. However, g_variant_parse() does allow non-nul-terminated strings
to be used with a @limit parameter, and the bugs become apparent under
valgrind if that parameter is used.
This includes modifications to the test cases to cover the
non-nul-terminated case.
Spotted by ossfuzz.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|