Commit Graph

23272 Commits

Author SHA1 Message Date
Dz Chen
7629fdaaeb Update Chinese (China) translation 2021-03-27 23:39:12 +00:00
Simon McVittie
6d50032167 Merge branch 'fuzz-path-fix' into 'master'
fuzzing: Fix assertion failure in fuzz_paths.c

See merge request GNOME/glib!2013
2021-03-25 17:28:20 +00:00
Simon McVittie
760ba5c4f1 Merge branch '2363-alloca-docs' into 'master'
galloca: Clarify alloca() sizes must always be controlled by the program

Closes #2363

See merge request GNOME/glib!2014
2021-03-25 17:27:23 +00:00
Philip Withnall
b657e78add galloca: Clarify alloca() sizes must always be controlled by the program
To avoid security vulnerabilities.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #2363
2021-03-25 12:55:21 +00:00
Philip Withnall
c3eb4a939b fuzzing: Fix assertion failure in fuzz_paths.c
If operating on a zero-length input, the return values of
`g_path_get_basename()` and `g_path_get_dirname()` are correctly `.`.
The assertions in the test didn’t account for this.

oss-fuzz#32454

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-03-25 11:23:55 +00:00
Philip Withnall
55cbc31517 Merge branch 'master' into 'master'
make g_tree_remove_all public

See merge request GNOME/glib!1986
2021-03-24 12:13:18 +00:00
Philip Withnall
eaaa41f98f Merge branch 'fuzz-path-functions' into 'master'
fuzzing: Add fuzz tests for functions which parse paths

See merge request GNOME/glib!2006
2021-03-24 11:16:49 +00:00
Philip Withnall
1140c228ab fuzzing: Add fuzz tests for functions which parse paths
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-03-24 11:16:49 +00:00
Philip Withnall
f078ba1fff Merge branch 'git-to-gitlab' into 'master'
docs: Replace git.gnome.org with gitlab.gnome.org urls

See merge request GNOME/glib!2012
2021-03-24 11:10:28 +00:00
Avinash Sonawane
5ce6ba287f docs: Replace git.gnome.org with gitlab.gnome.org urls 2021-03-24 16:18:53 +05:30
Philip Withnall
083e450d5f Merge branch 'docs' into 'master'
docs: Fix example program link

See merge request GNOME/glib!2011
2021-03-24 10:21:39 +00:00
Avinash Sonawane
d6a9b954fa docs: Fix example program link 2021-03-24 10:21:38 +00:00
Sebastian Dröge
8406a2b742 Merge branch '2361-key-file-locale-caching' into 'master'
gkeyfile: Fix crash when parsing translations on a second load

Closes #2361

See merge request GNOME/glib!2009
2021-03-23 16:52:15 +00:00
Philip Withnall
34e4841854 gkeyfile: Fix crash when parsing translations on a second load
If the same `GKeyFile` is reused to load multiple different key files,
any loads after the first which encounter translated keys will crash,
because clearing the data from the first load cleared the cached
language names, but didn’t clear `checked_locales`, so they were never
reloaded.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #2361
2021-03-23 16:33:33 +00:00
Philip Withnall
164da19983 gkeyfile: Drop a redundant check
It should not be possible for `->locales` to be set without
`->checked_locales` being set, so drop the redundant check. This helps
with branch code coverage.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-03-23 16:27:49 +00:00
liuyangming
8fb3101715 gtree: Make g_tree_remove_all() public
g_tree_remove_all is useful and the corresponding function in GHashTable
is exposed, so make this function public is meaningful.
2021-03-23 11:36:57 +00:00
Philip Withnall
9bad38887d Merge branch 'security-policy' into 'master'
docs: Add a policy for handling security issues

See merge request GNOME/glib!1985
2021-03-23 11:35:22 +00:00
Philip Withnall
0d8799b44b Merge branch 'tls-bindings-ci-failure' into 'master'
tests: Deactivate tls-bindings test suite for windows

See merge request GNOME/glib!2008
2021-03-23 11:30:16 +00:00
Frederic Martinsons
7f2fef5c26 tests: Deactivate tls-bindings test suite for windows
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>

Helps: #2297
2021-03-23 11:11:45 +00:00
Philip Withnall
01d1aaeb27 Merge branch 'wip/steal-fd' into 'master'
Add g_steal_fd() to API

See merge request GNOME/glib!1966
2021-03-22 11:48:10 +00:00
Simon McVittie
6c5a227bcc gmain: Add g_steal_fd() to API
This is basically glnx_steal_fd() from libglnx. We already had two
private implementations of it in GLib.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-03-22 11:48:10 +00:00
Sebastian Dröge
46c34ea20f Merge branch 'remove-out-caller-allocates-from-pod-types' into 'master'
introspection: Remove 'caller-allocates' from POD types

See merge request GNOME/glib!2005
2021-03-20 19:15:14 +00:00
Philip Chimento
748103d75a introspection: Remove 'caller-allocates' from POD types
The (out caller-allocates) and (out callee-allocates) annotations are
meant for structured or pointer types. Plain old data types are just
regular out parameters and don't need the annotation about who
allocates them.

See: https://gitlab.gnome.org/GNOME/gjs/-/issues/386
2021-03-20 11:14:15 -07:00
Philip Withnall
33734480d3 Merge branch 'parsing' into 'master'
goption.c: Simplfy parse_short_option()

See merge request GNOME/glib!1999
2021-03-19 11:07:16 +00:00
Avinash Sonawane
b21766ec3c goption.c: Simplfy parse_short_option() 2021-03-19 14:08:27 +05:30
Sebastian Dröge
2bf649320f Merge branch 'gpollableinputstream-read-nonblocking-caller-allocates' into 'master'
gpollableinputstream: Add missing annotation

See merge request GNOME/glib!1998
2021-03-19 07:39:38 +00:00
Марко Костић
32ed18237d Update Serbian translation 2021-03-19 07:30:25 +00:00
Philip Chimento
27b9d2cb27 gpollableinputstream: Add missing annotation
The buffer for g_pollable_input_stream_read_nonblocking() is an out
parameter which the caller must allocate.

See https://gitlab.gnome.org/GNOME/gjs/-/issues/389
2021-03-18 20:42:05 -07:00
Boyuan Yang
3653260ec2 Update Chinese (China) translation 2021-03-19 02:02:27 +00:00
Philip Withnall
2fd21175e7 Merge branch '2011-add-dbus-watch-name-tests' into 'master'
Resolve "Add additional unit tests for D-Bus name watching"

Closes #2011

See merge request GNOME/glib!1904
2021-03-18 21:10:19 +00:00
Philip Withnall
e45a92ece2 Merge branch 'citrus-it-master-patch-49452' into 'master'
Include glibconfig.h to get the G_OS_UNIX token

See merge request GNOME/glib!1996
2021-03-18 19:36:34 +00:00
Andy Fiddaman
1fafbb82b0 Include glibconfig.h to get the G_OS_UNIX token 2021-03-18 16:21:42 +00:00
Philip Withnall
9106fd4e81 Merge branch 'wip/start-2-70' into 'master'
gversionmacros: Add version macros for GLib 2.70

See merge request GNOME/glib!1965
2021-03-18 14:47:00 +00:00
Philip Withnall
bdea78295c Merge branch 'fix-data-to-c-line-endings' into 'master'
data-to-c.py: autodetect line endings

Closes #2340

See merge request GNOME/glib!1974
2021-03-18 14:00:05 +00:00
Philip Withnall
3a0edbed5b build: Post-release version bump to 2.69.0
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-03-18 13:58:50 +00:00
Simon McVittie
1248b642ad gversionmacros: Add version macros for GLib 2.70
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-03-18 13:58:41 +00:00
Philip Withnall
a58a47fd6d 2.68.0
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-03-18 13:27:26 +00:00
Matej Urbančič
840d50b8d8 Update Slovenian translation 2021-03-17 17:44:17 +00:00
Sebastian Dröge
c53711492c Merge branch 'coverity-localfileoutputstream-error-handling' into 'master'
glocalfileoutputstream: Tidy up error handling

See merge request GNOME/glib!1994
2021-03-17 07:43:03 +00:00
Frederic Martinsons
59e999fd0a Add two test cases which covers disconnection scenario in another thread
1) Check that schedule_call_in_idle code branch of gdbusnamewatching.c
   is working to call vanished handler in the thread which had watched the name
2) Check cancellation of vanished handler if the name is unwatched before
   vanished callback is dispatched.

Closes #2011

Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
2021-03-17 08:36:47 +01:00
Frederic Martinsons
2f5f69e969 Use OwnNameData structure when owning a name instead of WatchNameData.
The two structures share some common variable name but it's confusing.

Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
2021-03-17 08:36:47 +01:00
Frederic Martinsons
98abfc9da7 Correct memleak introduced by !1885
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
2021-03-17 08:36:47 +01:00
Philip Withnall
2696384e0e Merge branch 'mcatanzaro/queue' into 'master'
tests: Fix copy/paste error in queue test

See merge request GNOME/glib!1995
2021-03-16 18:11:55 +00:00
Michael Catanzaro
3a74ad128e tests: Fix copy/paste error in queue test
Coverity is pretty good at detecting copy/paste errors.
2021-03-16 12:53:44 -05:00
Philip Withnall
c4b4fecaef glocalfileoutputstream: Tidy up error handling
After the recent reworking of this code it was possible for `g_close()`
to be called on `fd == -1`, which is invalid. It would have reported an
error, were errors not ignored. So it was harmless, but still best to
fix.

Simplify the error handling by combining both error labels and checking
the state of `fd` dynamically.

Coverity CID: #1450834

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-03-16 11:36:27 +00:00
Milo Casagrande
01101813a5 Update Italian translation 2021-03-15 08:06:09 +00:00
Philip Withnall
4784da5047 Merge branch 'valgrind-updates' into 'master'
glib.supp: Generalize some suppressions

See merge request GNOME/glib!1989
2021-03-14 17:18:57 +00:00
Sebastian Dröge
094206f1eb Merge branch 'bytes-icon-docs' into 'master'
gbytesicon: Fix error in g_bytes_icon_new() documentation

See merge request GNOME/glib!1992
2021-03-14 16:20:12 +00:00
Philip Withnall
d26d70d66a gbytesicon: Fix error in g_bytes_icon_new() documentation
It said that `NULL` could be returned, but actually `g_bytes_icon_new()`
can never fail.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-03-14 15:53:24 +00:00
Aurimas Černius
7bd4a2b146 Updated Lithuanian translation 2021-03-14 12:30:22 +02:00