https://github.com/GNOME/glib

sort by:
Revision Author Date Message Commit Date
06824c6 Fix the autotools build 04 November 2018, 03:17:40 UTC
2bb04e4 Support the trash portal When we are in a sandbox, try to trash files via a portal. It works. 04 November 2018, 03:17:40 UTC
b09a0df Merge branch '1576-meson-armv5-atomic' into 'master' meson: Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 on GNU/Linux if needed Closes #1576 See merge request GNOME/glib!434 02 November 2018, 20:56:37 UTC
73a982f Merge branch 'wip/sadiq/likely' into 'master' gmacros: Fix G_[UN]LIKELY to not mask -Wparentheses See merge request GNOME/glib!372 02 November 2018, 20:45:38 UTC
5c7e64a Merge branch 'supp' into 'master' valgrind: Add glib_init()-related suppressions See merge request GNOME/glib!436 02 November 2018, 20:34:53 UTC
74d2a8e Merge branch 'test-timeout' into 'master' meson: Increase test timeouts See merge request GNOME/glib!407 02 November 2018, 11:02:32 UTC
8f115b6 Merge branch 'atomic-ref-count' into 'master' gvarianttypeinfo: Consistently use atomics to access ref_count See merge request GNOME/glib!444 02 November 2018, 10:29:48 UTC
7d4fb4d Merge branch 'g-test-rand-int-range-race' into 'master' tests: Avoid multithreaded use of g_test_rand_int_range See merge request GNOME/glib!443 02 November 2018, 10:21:20 UTC
aed3c00 gtestutils: Make test_rand_* thread-safe within a single test case Synchronize access to random number generator `test_run_rand` with a lock to ensure that `g_test_rand_*` family of functions is thread-safe. The reseeding taking place between test case runs is intentionally left unsynchronized. It is an error to continue using random number generator after test case has already finished running. Lack of synchronization here will make such erroneous use readily apparent with thread sanitizer. 02 November 2018, 07:29:08 UTC
03518e5 gvarianttypeinfo: Consistently use atomics to access ref_count 01 November 2018, 20:55:07 UTC
03413d5 meson: Mark gdatetime test as slow This test isn't inherently slow, but it produces so much output that it can take a minute or more on hardware with weak I/O performance. Signed-off-by: Simon McVittie <smcv@collabora.com> 01 November 2018, 19:13:21 UTC
a40ef2f meson: Increase fast test timeout from 30s to 60s This is enough for most Debian buildds, including embedded devices like mips and powerpcspe. It is not enough for hppa (PA-RISC), but that architecture is so uniquely slow that it might make more sense to special-case it downstream. Signed-off-by: Simon McVittie <smcv@collabora.com> 01 November 2018, 19:13:21 UTC
13e206a meson: Centralize test timeout values Signed-off-by: Simon McVittie <smcv@collabora.com> 01 November 2018, 19:13:21 UTC
d3f5559 Merge branch '1575-revert-strftime-format' into 'master' Revert "gdatetime: Enable compile time check of g_date_time_format() format" Closes #1575 See merge request GNOME/glib!442 01 November 2018, 18:12:41 UTC
e1056e5 Update Slovak translation (cherry picked from commit 985210849ceb926485656e8eddf8995b72de4ee5) 01 November 2018, 18:05:52 UTC
664fb63 Revert "gdatetime: Enable compile time check of g_date_time_format() format" This reverts commits: • 9ddcc79502349e02a1e796b363d891e177337af5 • ae02adc3c3795bb32348c07d8f48504b41e9e2c7 g_date_time_format() supports a few non-standard format placeholders: • %:z • %::z • %:::z These are all gnulib strtime() extensions, and hence are not recognised by the compiler when the function is annotated with G_GNUC_STRFTIME. However, this wasn’t noticed when we originally merged this change because the errors were disabled in the tests which covered those placeholders. 01 November 2018, 16:12:32 UTC
9ddcc79 Remove the G_GNUC_STRFTIME format check This does not work, since g_date_time_format() supports non-standard extensions such as %:::z, and this has broken several consumers which use format errors, such as ostree. 01 November 2018, 16:00:58 UTC
bfc661a Merge branch 'tests-memory-leaks' into 'master' Fix minor memory leaks in tests See merge request GNOME/glib!440 01 November 2018, 11:59:59 UTC
b7571d5 tests: Fix GVariantType leak in GAction tests 01 November 2018, 11:15:09 UTC
52bab02 tests: Fix GOptionContext leak in GSubprocess tests 01 November 2018, 11:14:52 UTC
9347c76 tests: Fix GRand leak in GMenuModel tests 01 November 2018, 11:14:09 UTC
afce4ef Merge branch 'flags_validation_fix' into 'master' gobject/genums.c: fix flags validation Closes #1572 See merge request GNOME/glib!401 01 November 2018, 10:46:29 UTC
aa1415c Add unit test for flags validation 31 October 2018, 22:41:32 UTC
1d6c784 gobject/genums.c: fix flags validation gint -> glong conversion causes flags to be invalid if the highest bit is set. Closes #1572 31 October 2018, 22:41:32 UTC
4f81c9e Merge branch 'gdate-timezone' into 'master' gdatetime: Fix formatting of time zones offsets in range -01:00 to +00:00 See merge request GNOME/glib!435 31 October 2018, 22:35:00 UTC
e7738e4 Merge branch 'mr/issue-1575' into 'master' Enable compile time check of g_date_time_format() format See merge request GNOME/glib!412 31 October 2018, 22:23:50 UTC
da790bc Merge branch 'gvariant' into 'master' Fix ^*ay handling in g_variant_iter_loop() See merge request GNOME/glib!417 31 October 2018, 22:16:02 UTC
63e09d5 valgrind: Add glib_init()-related suppressions 31 October 2018, 18:43:59 UTC
bd6d603 test-gvariant: Add missing spaces before parens Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> 31 October 2018, 17:44:21 UTC
38d48b8 test-gvariant: Add and use assert_cmpstrv helper Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> 31 October 2018, 17:44:21 UTC
422d83c test-gvariant: Remove some hardcoded strings Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> 31 October 2018, 17:43:19 UTC
572f78b test-gvariant: Use g_assert_* rather than g_assert() This is desirable both to get more detailed failure messages; and because g_assert() is compiled out when compiling with G_DISABLE_ASSERT, which renders the tests useless. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> 31 October 2018, 17:43:17 UTC
e6e04d3 test-gvariant: Use gsize for loop indices gint is not the best type when looping from 0 to N > 0, which usually is the case in loops. There are a few cases in this patch where guint is used rather than gsize, this is when the index is used in a printf-like function as this makes the format string easier to read Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> 31 October 2018, 17:41:00 UTC
b0a013e gvariant: Handle ^ay, ^&ay, ^aay, ^a&ay in g_variant_valist_free_nnp g_variant_valist_free_nnp does not take into account ^*ay, which causes crash when trying to use these types together with g_variant_iter_loop(). 31 October 2018, 17:38:11 UTC
54c394a gdatetime: Fix formatting of time zones offsets in range -01:00 to +00:00 Formatting code for `%z` specifier incorrectly assumed that sign of offset from UTC can be recovered from the number of hours alone, which is not true for offsets between -01:00 and +00:00. Extract and format sign separately to avoid the problem. Issue #1337. 31 October 2018, 14:02:22 UTC
ae02adc gdatetime: Enable compile time check of g_date_time_format() format By annotating it with G_GNUC_STRFTIME. https://gitlab.gnome.org/GNOME/glib/issues/1575 31 October 2018, 10:50:07 UTC
d62a078 gmacros: Add G_GNUC_STRFTIME macro Analogous to G_GNUC_PRINTF and G_GNUC_SCANF, to annotate functions similar to strftime. https://gitlab.gnome.org/GNOME/glib/issues/1575 31 October 2018, 10:50:07 UTC
7d1b94d test-gvariant: Add test for ^ay, ^&ay, ^aay, ^a&ay This will exhibit bugs in g_variant_valist_free_nnp() as these types are not properly handled. 30 October 2018, 20:04:08 UTC
4e058a6 meson: Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 on GNU/Linux if needed armv5 Linux systems implement __sync_bool_compare_and_swap() and friends by calling a function provided by the kernel. This is not technically an atomic intrinsic, so gcc doesn't define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 in this case, but it's good enough for us. Extend the current Android special case to cover GNU/Linux too. The possibilities are: * __sync_foo detected and __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 predefined: calls to __atomic_foo or __sync_foo primitives are inlined into user code by gatomic.h * __sync_foo detected but __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 not predefined: user code has an extern reference to g_atomic_foo(), which calls __atomic_foo or __sync_foo because we defined __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 when compiling GLib itself * Windows: user code has an extern reference to g_atomic_foo(), which calls InterlockedFoo() * !defined(G_ATOMIC_LOCK_FREE): user code has an extern reference to g_atomic_foo(), which emulates atomic operations with a mutex Signed-off-by: Simon McVittie <smcv@collabora.com> Closes: #1576 30 October 2018, 17:20:43 UTC
361fed5 Merge branch 'fix-mainloop-test' into 'master' mainloop-test: Fix race conditions Closes #1530 See merge request GNOME/glib!429 30 October 2018, 16:43:13 UTC
09799a8 Merge branch 'meson-test-cleanup' into 'master' Meson: Cleanup a FIXME now that we have dict addition See merge request GNOME/glib!418 30 October 2018, 11:33:20 UTC
f65adb4 Merge branch 'gdate-reinitialize' into 'master' gdate: Reinitialize using_twodigit_years and locale_era_adjust. See merge request GNOME/glib!425 30 October 2018, 11:00:41 UTC
88f36a1 mainloop-test: Fix race conditions * Wait for adder threads before deallocating crawler_array and context_array to avoid use after-free and data race. * Handle spurious wakeups around g_cond_wait. * Avoid starting recurser_idle without context. Fixes issue #1530. 29 October 2018, 23:55:14 UTC
a8fd91a gdate: Reinitialize locale information in g_date_prepare_to_parse. When g_date_set_parse was used with more than one locale it could incorrectly retain information from previous one. Reinitialize all locale specific data inside g_date_prepare_to_parse to avoid the issue. 29 October 2018, 23:24:40 UTC
d512c0f Merge branch 'wjt/gdbus-codegen-add-autocleanup-for-FooObject' into 'master' gdbus-codegen: add autocleanup for FooObject See merge request GNOME/glib!420 29 October 2018, 23:12:41 UTC
745422a gdbus-codegen: add autocleanup for FooObject This is only enabled with `--c-generate-autocleanup all` for the reasons discussed on https://bugzilla.gnome.org/show_bug.cgi?id=763379. 29 October 2018, 22:48:26 UTC
5b78c3f gdbus-codegen: test generating autocleanups This is the most degenerate possible test but it does exercise this code path. (Tweaked by Philip Withnall <withnall@endlessm.com> to also add the flag to the autotools build.) 29 October 2018, 22:48:26 UTC
c1b3177 Merge branch '827-main-context-docs' into 'master' gmain: Clarify that g_source_set_callback() is safe on attached sources Closes #827 See merge request GNOME/glib!426 29 October 2018, 22:32:51 UTC
58b9635 Merge branch 'issue-1562' into 'master' tests: Update month name check for Lithuanian locale Closes #1562 See merge request GNOME/glib!373 29 October 2018, 22:22:27 UTC
bfe5906 gmain: Clarify that g_source_set_callback() is safe on attached sources g_source_set_callback() and g_source_set_callback_indirect() are both safe to call zero or more times on attached sources. The change in callback will take effect the next time the source is dispatched, after the set_callback() call returns (it could block due to locking). https://gitlab.gnome.org/GNOME/glib/issues/827 29 October 2018, 22:10:33 UTC
c2501a8 Merge branch 'ossfuzz-9672-markup-overflow' into 'master' GMarkup buffer overflow fixes for error handling, round 2 See merge request GNOME/glib!422 29 October 2018, 22:03:05 UTC
89ee8bf Merge branch 'wip/lantw/check-getauxval-for-freebsd-12' into 'master' gutils: Check whether getauxval function exists See merge request GNOME/glib!423 29 October 2018, 15:59:09 UTC
295964a gutils: Check whether getauxval function exists FreeBSD 12 adds a new header, sys/auxv.h, to declare a function, elf_aux_info, for public use, which was considered an internal function in previous releases. This new function provides similar functionality with glibc getauxval, which is also declared in the same header, but their interfaces are not compatible. Since the only usage of sys/auxv.h is in g_check_setuid and FreeBSD already has issetugid to provide the required functionality, we fixes the compilation error by adding a check for getauxval function to prevent g_check_setuid from calling getauxval when sys/auxv.h is found but getauxval is not available. https://reviews.freebsd.org/D12743 https://reviews.freebsd.org/rS324815 29 October 2018, 14:57:24 UTC
6e77089 Merge branch 'fix-ci' into 'master' ci: Fix Docker image version See merge request GNOME/glib!424 29 October 2018, 14:50:41 UTC
304f84b ci: Fix Docker image version Someone uploaded a v9 image to the registry without updating the CI YAML. Signed-off-by: Philip Withnall <withnall@endlessm.com> 29 October 2018, 13:30:28 UTC
1a7f07f tests: Rework markup parsing test to not stop on first failure Previously, the markup parsing test would load a given markup file and try to parse it several ways. It would return as soon as one of the attempts failed — meaning that bugs only seen with non-nul-terminated, or differently chunked, parse runs could never be caught. Rework the tests so that all markup files are tested all ways, and we assert that all ways of parsing them give the same result. Signed-off-by: Philip Withnall <withnall@endlessm.com> 26 October 2018, 10:23:00 UTC
2187b1b gmarkup: Fix validation of element names Previously, the element name validation only happened if a start_element callback was specified on the context. Element name validation should be unconditional. This was causing test-5.gmarkup to fail when run against the improved tests in the following commit. Signed-off-by: Philip Withnall <withnall@endlessm.com> 26 October 2018, 10:23:00 UTC
3a96123 gmarkup: Avoid reading off the end of a buffer when non-nul-terminated When extracting a UTF-8 character to put in an error message on parse failure, pass the remaining buffer length to utf8_str() to avoid it running off the end of the input buffer. It previously assumed that the buffer was nul-terminated, which was the case in all the tests until now. A following commit will add test coverage for this. Signed-off-by: Philip Withnall <withnall@endlessm.com> 26 October 2018, 10:08:43 UTC
f502141 tests: Run GMarkup tests with and without nul-termination When using GMarkup to parse a string, the string can be provided with an explicit length specified, or with no length and a nul terminator instead. Run all the GMarkup tests both ways, to catch problems with length checks, or with nul terminator checks. Signed-off-by: Philip Withnall <withnall@endlessm.com> 26 October 2018, 09:57:07 UTC
d6f2462 tests: Add another GMarkup test from oss-fuzz This doesn’t trigger any new failures, but is distinct from other tests we have, so would be good to retain. Related to commit cec71705406f0b2790422f0c1aa0ff3b4b464b1b. Signed-off-by: Philip Withnall <withnall@endlessm.com> 26 October 2018, 09:57:07 UTC
7c09bcb Updated Slovenian translation 25 October 2018, 19:35:53 UTC
aff686a Meson: Cleanup a FIXME now that we have dict addition 25 October 2018, 14:50:10 UTC
4d48e02 Merge branch 'gdbus-peer-again' into 'master' gdbus-peer: Make sure to not include objectmanager-gen.c source See merge request GNOME/glib!416 25 October 2018, 12:23:15 UTC
7c70bef gdbus-peer: Make sure to not include objectmanager-gen.c source The executable depends only on the generated header file at compile time, and on the library at link time. So meson can decide to compile gdbus-peer.c before compiling the library and thus won't have generated the header yet, causing the build error. So declare_dependency() should only have the header file in its sources, to force generating files before compiling gdbus-peer.c without including objectmanager-gen.c into gdbus-peer's sources. 25 October 2018, 11:34:23 UTC
7cf02db Merge branch 'wjt/gseekable-fix-attmepting-typo' into 'master' gseekable: fix 'attmepting' typo See merge request GNOME/glib!415 25 October 2018, 08:59:56 UTC
cd524d0 gseekable: fix 'attmepting' typo 25 October 2018, 08:33:19 UTC
5263b54 Merge branch 'objectmanager-src-dep' into 'master' gio, tests: ensure objectmanager sources are generated See merge request GNOME/glib!414 25 October 2018, 04:28:09 UTC
11e4fcc gio, tests: ensure objectmanager sources are generated We use libgdbus_example_objectmanager_dep as dependency for various tests, but this implies only a link dependency while it doesn't ensure that the sources are generated. Make this explicit 24 October 2018, 01:58:09 UTC
1564ef5 Merge branch 'wip/oholy/fix-trash-symlink' into 'master' glocalfile: Fix access::can-trash if parent is symlink Closes #1522 See merge request GNOME/glib!326 24 October 2018, 00:03:55 UTC
25b7716 Merge branch 'nirbheek/macos-library-versions' into 'master' meson: Add macOS libtool versioning for ABI compatibility See merge request GNOME/glib!282 24 October 2018, 00:00:35 UTC
228a1d6 Updated Slovenian translation 23 October 2018, 14:34:21 UTC
372e81b Merge branch 'ci-test-installed' into 'master' CI: Test static build on installed glib See merge request GNOME/glib!360 23 October 2018, 13:56:46 UTC
7fa6e9e CI: Test static build on installed glib 23 October 2018, 13:45:12 UTC
7db6389 Merge branch 'shorten-gdbus-test-filename' into 'master' build: work around meson issue with too long filenames on Windows. Fixes #1556 Closes #1556 See merge request GNOME/glib!370 23 October 2018, 09:16:58 UTC
39afe07 Merge branch 'wip/oholy/bind-mounts' into 'master' gunixmounts: Mark mounts as system internal instead of filtering out See merge request GNOME/glib!366 23 October 2018, 07:32:32 UTC
983a95c gunixmounts: Mark mounts as system internal instead of filtering out mntent-based implementation filter out mounts with device path that was repeated. Consequently, it is not possible to show such mounts in UI even with x-gvfs-show, because they are not returned from g_unix_mounts_get. libmount-based implementation currently doesn't filter out any mounts which causes issues to our volume monitors. Let's rather mark mounts which don't point into fs root as system_internal. This approach won't be affected by mount order as is mntent-based implementation. It will mark more mounts as system_internal than it is filtered out with mntend-based implementation, but there will be always possibility to show them in UI over x-gvfs-show, which was not possible with mntend-based. We can probably introduce some improvements later to not mark unique mounts as system internal even if they don't point into fs root... https://gitlab.gnome.org/GNOME/glib/issues/1271 23 October 2018, 07:01:04 UTC
e1fa5ff gio: Add g_unix_mount_get_root_path Currently, there isn't API to determine root path for mounts created over bind operation (or btrfs subvolumes). This causes issues to our volume monitors if there is multiple mounts for one device, which can happen with libmount-based implementation currently. Let's propagate root path from libmount over g_unix_mount_get_root_path, so we can handle this somehow in our volume monitors. https://gitlab.gnome.org/GNOME/glib/issues/1271 23 October 2018, 07:01:04 UTC
a56b9cc glocalfile: Use MAXSYMLINKS when following symlinks Currently, readlink() is used only 12 times when expanding symlinks. However, kernel uses 40 for this purpose and it is defined as MAXSYMLINKS. Use that constant if available, or 40. See: https://github.com/torvalds/linux/include/linux/namei.h. 23 October 2018, 06:53:55 UTC
b619105 glocalfile: Return NULL if symlink expansion fails find_mountpoint_for() uses current file in case of error, because get_parent() returns NULL for error, but also if parent doesn't exist. Return "." from get_parent() if parent doesn't exist in order to differentiate the error state. 23 October 2018, 06:53:55 UTC
57cfbc9 glocalfile: Add test case for symlink expansion Test symlink expansion in find_mountpoint_for() function over _g_local_file_find_topdir_for(). find_mount_for() is crucial for many of glocalfile.c functionality (e.g. to determine correct trash location) and symlink expansion has to work properly. https://gitlab.gnome.org/GNOME/glib/issues/1522 23 October 2018, 06:53:54 UTC
85de774 Merge branch 'dirname-of-root-docs' into 'master' gfileutils: Add examples to g_path_get_dirname() documentation See merge request GNOME/glib!410 23 October 2018, 06:49:57 UTC
d192a07 Merge branch 'ossfuzz-9810-9825-10319-9803-9857-9801-fixes' into 'master' Various GVariant, GMarkup and GDBus fuzzing fixes See merge request GNOME/glib!411 23 October 2018, 04:30:21 UTC
1c421b0 glib: Port various callers to use g_utf8_validate_len() These were callers which explicitly specified the string length to g_utf8_validate(), when it couldn’t be negative, and hence should be able to unconditionally benefit from the increased string handling length. At least one call site would have previously silently changed behaviour if called with strings longer than G_MAXSSIZE in length. Another call site was passing strlen(string) to g_utf8_validate(), which seems pointless: just pass -1 instead, and let g_utf8_validate() calculate the string length. Its behaviour on embedded nul bytes wouldn’t change, as strlen() stops at the first one. Signed-off-by: Philip Withnall <withnall@endlessm.com> 23 October 2018, 04:01:51 UTC
7a4025c gutf8: Add a g_utf8_validate_len() function This is a variant of g_utf8_validate() which requires the length to be specified, thereby allowing string lengths up to G_MAXSIZE rather than just G_MAXSSIZE. Signed-off-by: Philip Withnall <withnall@endlessm.com> 23 October 2018, 04:01:51 UTC
8e60b3d tests: Use g_assert_null() in gdbus-serialization test This introduces no real functional changes (except when compiling with G_DISABLE_ASSERT, in which case it fixes the test). Mostly just a code cleanup. Signed-off-by: Philip Withnall <withnall@endlessm.com> 23 October 2018, 04:01:51 UTC
c2c9c7f tests: Tidy up GError handling in gdbus-serialization test This introduces no functional changes; just a bit of code tidying. Signed-off-by: Philip Withnall <withnall@endlessm.com> 23 October 2018, 04:01:51 UTC
5f3b393 gvariant: Clarify internal documentation about GVariant type strings Signed-off-by: Philip Withnall <withnall@endlessm.com> 23 October 2018, 04:01:51 UTC
e03d5a3 gdbusmessage: Check for valid GVariantType when parsing a variant blob The code was checking whether the signature provided by the blob was a valid D-Bus signature — but that’s a superset of a valid GVariant type string, since a D-Bus signature is zero or more complete types. A GVariant type string is exactly one complete type. This meant that a D-Bus message with a header field containing a variant with an empty type signature (for example) could cause a critical warning in the code parsing it. Fix that by checking whether the string is a valid type string too. Unit test included. oss-fuzz#9810 Signed-off-by: Philip Withnall <withnall@endlessm.com> 23 October 2018, 04:01:51 UTC
968f1c6 gdbusmessage: Fix a typo in a documentation comment Signed-off-by: Philip Withnall <withnall@endlessm.com> 23 October 2018, 04:01:51 UTC
50b544e gdbusmessage: Clarify error returns for g_dbus_message_new_from_blob() Signed-off-by: Philip Withnall <withnall@endlessm.com> 23 October 2018, 04:01:51 UTC
94a9ab3 gdbusmessage: Improve documentation for g_dbus_message_get_header() The caller is responsible for checking the type of the returned GVariant. Signed-off-by: Philip Withnall <withnall@endlessm.com> 23 October 2018, 04:01:51 UTC
af712bb gdbusmessage: Validate type of message header signature field Parsing a D-Bus message with the signature field in the message header of type other than ‘g’ (GVariant type signature) would cause a critical warning. Instead, we should return a runtime error. Includes a test. oss-fuzz#9825 Signed-off-by: Philip Withnall <withnall@endlessm.com> 23 October 2018, 04:01:51 UTC
f148687 gvariant: Limit GVariant strings to G_MAXSSIZE When validating a string to see if it’s valid UTF-8, we pass a gsize to g_utf8_validate(), which only takes a gssize. For large gsize values, this will result in the gssize actually being negative, which will change g_utf8_validate()’s behaviour to stop at the first nul byte. That would allow subsequent nul bytes through the string validator, against its documented behaviour. Add a test case. oss-fuzz#10319 Signed-off-by: Philip Withnall <withnall@endlessm.com> 23 October 2018, 04:01:51 UTC
7eedcd7 gvariant: Check tuple offsets against serialised data length As with the previous commit, when getting a child from a serialised tuple, check its offset against the length of the serialised data of the tuple (excluding the length of the offset table). The offset was already checked against the length of the entire serialised tuple (including the offset table) — but a child should not be able to start inside the offset table. A test is included. oss-fuzz#9803 Signed-off-by: Philip Withnall <withnall@endlessm.com> 23 October 2018, 04:01:51 UTC
5e0b12d gvariant: Check array offsets against serialised data length When getting a child from a serialised variable array, check its offset against the length of the serialised data of the array (excluding the length of the offset table). The offset was already checked against the length of the entire serialised array (including the offset table) — but a child should not be able to start inside the offset table. A test is included. oss-fuzz#9803 Signed-off-by: Philip Withnall <withnall@endlessm.com> 23 October 2018, 04:01:51 UTC
7c4e6e9 gvarianttype: Impose a recursion limit of 128 on variant types Previously, GVariant has allowed ‘arbitrary’ recursion on GVariantTypes, but this isn’t really feasible. We have to deal with GVariants from untrusted sources, and the nature of GVariantType means that another level of recursion (and hence, for example, another stack frame in your application) can be added with a single byte in a variant type signature in the input. This gives malicious input sources far too much leverage to cause deep stack recursion or massive memory allocations which can DoS an application. Limit recursion to 128 levels (which should be more than enough for anyone™), document it and add a test. This is, handily, also the limit of 64 applied by the D-Bus specification (§(Valid Signatures)), plus a bit to allow wrapping of D-Bus messages in additional layers of variants. oss-fuzz#9857 Signed-off-by: Philip Withnall <withnall@endlessm.com> 23 October 2018, 04:01:51 UTC
eb7c9ad gvariant: Fix checking arithmetic for tuple element ends When checking whether a serialised GVariant tuple is in normal form, it’s possible for `offset_ptr -= offset_size` to underflow and wrap around, resulting in gvs_read_unaligned_le() reading memory outside the serialised GVariant bounds. See §(Tuples) in gvariant-serialiser.c for the documentation on how tuples are serialised. Briefly, all variable-length elements in the tuple have an offset to their end stored in an array of offsets at the end of the tuple. The width of each offset is in offset_size. offset_ptr is added to the start of the serialised tuple to get the offset which is currently being examined. The offset array is in reverse order compared to the tuple elements, hence the subtraction. The bug can be triggered if a tuple contains a load of variable-length elements, each of whose length is actually zero (i.e. empty arrays). Includes a unit test. oss-fuzz#9801 Signed-off-by: Philip Withnall <withnall@endlessm.com> 23 October 2018, 04:01:51 UTC
ec5d6ab gfileutils: Add examples to g_path_get_dirname() documentation See https://gitlab.gnome.org/GNOME/glib/merge_requests/326. Signed-off-by: Philip Withnall <withnall@endlessm.com> 23 October 2018, 01:38:13 UTC
da512ad Merge branch 'stap-pass-cflags' into 'master' build-sys: Pass CFLAGS to $(DTRACE) See merge request GNOME/glib!403 22 October 2018, 22:39:59 UTC
8b3590c meson: Add macOS libtool versioning for ABI compatibility With this, the compatibility version and current version values in macOS and iOS dylibs will match the values set by Autotools. See: https://github.com/mesonbuild/meson/issues/1451 22 October 2018, 01:21:32 UTC
back to top