Commit Graph

28133 Commits

Author SHA1 Message Date
Alex Richardson
ed6cc1ddb2 guniprop.c: Avoid creating (temporarily) out-of-bounds pointers
This is detected by UBSan on CHERI systems (e.g. Arm Morello) and could
result in non-derefenceable pointers when compiled without optimizations.
2023-09-11 22:50:05 -07:00
Philip Withnall
82c764ce2e gthreadedresolver: Fix race between source callbacks and finalize
I had thought that because `g_source_destroy()` was called for the two
sources (cancel and timeout) in the `GTask` finalize function for a
threaded resolver operation, that it would be fine to use a plain
pointer in the source callbacks to point to the `GTask`.

That turns out to not be true: because the source callbacks are executed
in the GLib worker thread, and the `GTask` can be finalized in another
thread, it’s possible for a source callback (e.g. `cancelled_cb()`) to
be scheduled in the worker thread, then for the `GTask` to be finalized,
and then the source callback to continue execution and find itself
doing a use-after-free.

Fix that by using a weak ref to the `GTask` in the source callbacks,
rather than a plain pointer.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>

Fixes: #3105
2023-09-11 16:02:15 +01:00
Matej Urbančič
cfab7d1d48 Update Slovenian translation 2023-09-11 13:47:39 +00:00
badcel
784b8f5cc9
Update GOptionContext annotations 2023-09-11 13:42:10 +02:00
badcel
7ae41b9427
Update GDir annotations 2023-09-11 13:38:26 +02:00
badcel
01b1570bb5
Update GAsyncQueue annotations 2023-09-11 13:38:03 +02:00
badcel
f5860b0f4a
Update annotations for GHmac 2023-09-11 13:31:39 +02:00
badcel
5546757b2f
Update GStringChunk annotations 2023-09-11 12:52:39 +02:00
badcel
bd7bd87c8e
Update GTimer annotations 2023-09-11 11:55:45 +02:00
badcel
47c7eda5e0
Update GRand annotations 2023-09-11 11:33:47 +02:00
Daniel Mustieles
a4a356e137 Updated Spanish translation 2023-09-11 10:16:42 +02:00
Jordi Mas i Hernandez
28e6e27acf Update Catalan translation 2023-09-11 06:51:39 +00:00
Philip Withnall
3c543ef69f
2.78.0
Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
2023-09-08 14:42:18 +01:00
Ekaterine Papava
e1ea1c549a Update Georgian translation 2023-09-08 12:09:06 +00:00
Asier Sarasua Garmendia
69e2007f68 Update Basque translation 2023-09-07 15:32:54 +00:00
Luca Bacci
a76de5e039 gconstructor.h: Drop support for Visual C++ 2005
It's not supported anymore, remove dedicated code
2023-09-07 14:52:11 +02:00
Ekaterine Papava
d1660d06bd Update Georgian translation 2023-09-07 01:22:10 +00:00
Anders Jonsson
0cc4109dc8 Update Swedish translation 2023-09-06 23:09:36 +00:00
Michael Catanzaro
a366189062 Merge branch 'keyfile-invalid-escapes' into 'main'
gkeyfile: Temporarily re-allow invalid escapes when parsing strings

Closes #3095

See merge request GNOME/glib!3565
2023-09-06 14:02:58 +00:00
Philip Withnall
a2a5d91354 Merge branch 'fix-gutils-user-database' into 'main'
Fix gutils-user-database unit test

See merge request GNOME/glib!3564
2023-09-06 12:11:49 +00:00
Sebastian Wilhelmi
f7d930a58b Fix gutils-user-database unit test
The gutils-user-database.c is broken in two ways and currently doesn't test anything:

* It only overrides getpwuid, where the implementation used getpwnam_r if it exist, which should be every system for at least 20 years.
* It only partly cargo-culted setting the environment for the local and installed tests, but failed to actually set the environment for either.
2023-09-06 12:11:49 +00:00
Bruce Cowan
9e979ce749 Update British English translation
(cherry picked from commit 3cc56a0e8e)
2023-09-06 11:33:45 +00:00
Philip Withnall
4a96727642 gkeyfile: Temporarily re-allow invalid escapes when parsing strings
Before commit 71b7efd08a, `GKeyFile`
incorrectly allowed invalid escape sequences: it would treat the
sequence as a literal, set a `GError`, but not return failure from the
function. So if a caller was explicitly checking for returned `GError`s,
they could detect the invalid escape; but if they were just checking the
function’s return value, they’d miss it.

This is not correct use of `GError`, and the [Desktop Entry
Spec](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s04.html)
doesn’t allow for invalid escape sequences to be accepted. So it’s wrong
in both ways.

However, the commit above changed this behaviour without realising it,
quite close to the 2.78 stable release deadline. There are numerous key
files in the wild which use invalid escape sequences, and it’s too late
in the cycle to ‘break’ parsing of all of them.

So, for now, revert to the old behaviour for invalid escape sequences,
and give people another cycle to adapt to the changes. This will likely
mean they end up calling `g_key_file_get_value()` rather than
`g_key_file_get_string()`. See
https://gitlab.gnome.org/GNOME/glib/-/issues/3098 for tracking
re-enabling the error handling for invalid escape sequences.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>

Fixes: #3095
See: #3098
2023-09-06 12:08:56 +01:00
Andika Triwidada
efc74ca36c Update Indonesian translation 2023-09-06 06:35:00 +00:00
Changwoo Ryu
346196e6aa Update Korean translation 2023-09-06 04:17:39 +00:00
Balázs Úr
e2c37bd78b Update Hungarian translation 2023-09-05 18:35:27 +00:00
Michael Catanzaro
fcba22cfb9 Merge branch 'pr/fix_install_tags' into 'main'
meson: fix `gnetworking.h` install tag

See merge request GNOME/glib!3561
2023-09-04 12:58:59 +00:00
Philip Withnall
37309f165e Merge branch 'gdbplugin' into 'main'
gdb: Workaround optimized out quark_seq_id

See merge request GNOME/glib!3559
2023-09-04 11:29:57 +00:00
Thibault Saunier
033b472432 gdb: Workaround optimized out quark_seq_id 2023-09-04 11:29:57 +00:00
Philip Withnall
2885999394 Merge branch 'gthread-exit-noreturn' into 'main'
gthread: Annotate g_thread_exit() with G_NORETURN

See merge request GNOME/glib!3562
2023-09-04 11:07:56 +00:00
Alan Mortensen
792682be9c Update Danish translation 2023-09-04 05:43:29 +00:00
Vojtěch Perník
8bbcdb03e5 Update Czech translation 2023-09-03 12:38:40 +00:00
Danial Behzadi
8f9b8c9fa2 Update Persian translation 2023-09-02 20:49:36 +00:00
Yosef Or Boczko
3df4782d92 Update Hebrew translation 2023-09-02 18:04:43 +00:00
Piotr Drąg
3f2bf81ca0 Update Polish translation 2023-09-02 13:39:13 +00:00
Emin Tufan Çetin
3fda0de211 Update Turkish translation 2023-09-02 11:57:48 +00:00
Philip Chimento
a10f42dad8 gthread: Annotate g_thread_exit() with G_NORETURN
pthread_exit() is also marked noreturn, and the function does not in
fact return.

For win32, I can't find a copy of the header file to check if
_endthreadex() is marked with __declspec(noreturn), but its
documentation does say that it never returns.
2023-09-01 23:49:25 -07:00
Benoit Pierre
6380303779 meson: fix gnetworking.h install tag 2023-09-01 22:24:39 +02:00
Philipp Kiemle
dea6ab937f Update German translation 2023-09-01 14:30:04 +00:00
Fran Dieguez
00f8004713 Update Galician translation 2023-09-01 10:28:43 +00:00
Aurimas Černius
5f608cf0fa Update Lithuanian translation 2023-08-31 20:15:53 +00:00
Yuri Chornoivan
27f47e8452 Update Ukrainian translation 2023-08-31 19:10:30 +00:00
Jürgen Benvenuti
55e5e3bcd8 Update German translation
(cherry picked from commit 3e432b6b69)
2023-08-31 14:08:50 +00:00
Philip Withnall
aa2e243dbf
2.77.3
Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
2023-08-31 11:23:47 +01:00
Philip Withnall
137956e700 Merge branch '3061-dbus-name-crash' into 'main'
gdbusmessage: Validate required headers have the right type

Closes #3061

See merge request GNOME/glib!3539
2023-08-31 10:14:03 +00:00
Philip Withnall
ff0eea48ae Merge branch 'keyfile-escape-fix' into 'main'
gkeyfile: Fix overwriting of GError

See merge request GNOME/glib!3555
2023-08-31 10:04:50 +00:00
Jan Luebbe
71b7efd08a gkeyfile: Fix overwriting of GError
When parsing a line of "key3=foo\i\" in a keyfile,
g_key_file_parse_value_as_string currently first sets the error to
'contains invalid escape' and later to 'contains escape character at end
of line'.

This leaks the first GError and causes the following warning message:
  Error set over the top of a previous GError or uninitialized memory.
  This indicates a bug in someone's code. You must ensure an error is
  NULL before it's set. The overwriting error message was: Key file
  contains escape character at end of line

Fix this by returning when an error is detected. As we may have
collected data in pieces, we instead collect to a tmp_pieces GSList and
free it on error.
2023-08-30 19:17:44 +02:00
Amn Alam
7438668696 Update Punjabi translation 2023-08-30 01:55:48 +00:00
Michael Catanzaro
197e6d6f5d Merge branch '3090-resource-uri-malformed' into 'main'
gresourcefile: Fix crash if called with a badly escaped URI

Closes #3090

See merge request GNOME/glib!3554
2023-08-29 15:31:32 +00:00
Philip Withnall
ed03b1f3f6 gresourcefile: Fix crash if called with a badly escaped URI
Return an invalid `GFile` instead, as is the custom for VFS functions.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>

Fixes: #3090
2023-08-29 11:22:43 +01:00