Commit Graph

27203 Commits

Author SHA1 Message Date
Daniel Rusek
0d396d113e Update Czech translation 2023-09-17 13:02:20 +00:00
Artur S0
80176203cb Update Russian translation 2023-09-16 09:30:49 +00:00
Martin
f3068f1c78 Update Slovenian translation 2023-09-11 17:02:13 +00:00
Daniel Mustieles
abecf412f7 Update Spanish translation 2023-09-11 07:38:37 +00:00
Daniel Rusek
351e350e5e Update Czech translation 2023-09-08 14:38:50 +00:00
Bruce Cowan
3cc56a0e8e Update British English translation 2023-09-06 11:33:35 +00:00
Andika Triwidada
61e2374904 Update Indonesian translation 2023-09-06 08:12:54 +00:00
Aurimas Černius
a1b0deed1a Update Lithuanian translation 2023-09-05 18:41:57 +00:00
Balázs Úr
94c105faa3 Update Hungarian translation 2023-09-05 18:33:44 +00:00
Piotr Drąg
2218ee6f7e Update Polish translation 2023-09-02 13:36:34 +00:00
Emin Tufan Çetin
d49c8008bb Update Turkish translation 2023-09-02 12:05:50 +00:00
Anders Jonsson
9de3a8ed13 Update Swedish translation 2023-08-31 19:24:48 +00:00
Yuri Chornoivan
0d340e83df Update Ukrainian translation 2023-08-31 19:17:46 +00:00
Hugo Carvalho
946f1cbb14 Update Portuguese translation 2023-08-31 17:43:04 +00:00
Jürgen Benvenuti
3e432b6b69 Update German translation 2023-08-31 14:08:41 +00:00
Philip Withnall
f0171c9ecc
2.76.5
Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
2023-08-31 12:08:59 +01:00
Emmanuele Bassi
c5acaeaa30 Merge branch 'backport-3539-gdbus-validation-glib-2-76' into 'glib-2-76'
Backport !3539 “gdbusmessage: Validate required headers have the right type” to glib-2-76

See merge request GNOME/glib!3558
2023-08-31 11:01:10 +00:00
Marco Trevisan
f72276d6a8 Merge branch 'backport-3555-keyfile-error-handling-glib-2-76' into 'glib-2-76'
Backport !3555 “gkeyfile: Fix overwriting of GError” to glib-2-76

See merge request GNOME/glib!3557
2023-08-31 10:37:16 +00:00
Philip Withnall
65ea5bde8e gdbusconnection: Add some assertions about required message fields
The fields are fully validated in `validate_headers()` in
`gdbusmessage.c` now, so the connection code should be able to rely on
the required ones being non-`NULL`.

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

Helps: #3061
2023-08-31 11:15:34 +01:00
Philip Withnall
d10e5d30e5 gdbusconnection: Combine two identical variables
`object_path` and `path` were doing exactly the same thing here.

This introduces no functional changes.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
2023-08-31 11:15:34 +01:00
Philip Withnall
18fb55bf05 gdbusmessage: Validate required headers have the right type
We already validated that the required headers for each type of D-Bus
message were present. However, we didn’t validate that they contained a
variant of the right type. This could lead to functions like
`g_dbus_message_get_path()` returning `NULL` unexpectedly.

This failure could only be hit when using GDBus in peer-to-peer mode, or
with a D-Bus server which didn’t validate the headers itself. The
reference D-Bus server does validate the headers, and doesn’t forward
invalid messages to clients.

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

Fixes: #3061
2023-08-31 11:15:34 +01:00
Jan Luebbe
3fd1b63453 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-31 11:07:19 +01:00
Michael Catanzaro
32b36328e8 Merge branch 'backport-3554-resource-uri-malformed-glib-2-76' into 'glib-2-76'
Backport !3554 “gresourcefile: Fix crash if called with a badly escaped URI” to glib-2-76

See merge request GNOME/glib!3556
2023-08-29 17:24:03 +00:00
Philip Withnall
14b96540df 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 16:42:00 +01:00
Michael Catanzaro
488445d312 Merge branch 'backport-3547-fileutils-y2038-glib-2-76' into 'glib-2-76'
Backport !3547 “glib/gfileutils.c: use 64 bits for value in get_tmp_file()” to glib-2-76

See merge request GNOME/glib!3549
2023-08-24 15:05:35 +00:00
Alexander Kanavin
b4d60ba136 glib/gfileutils.c: use 64 bits for value in get_tmp_file()
On 32 bit systems 'long' value will overflow in 2038 and become negative.
As it is used to index into letters array, and % operation preserves signs,
data corruption will then occur.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
2023-08-24 10:11:14 +01:00
Emmanuele Bassi
40fb81f0ea Merge branch 'backport-3529-menu-exporter-locking-glib-2-76' into 'glib-2-76'
Backport !3529 “gmenuexporter: synchronization in org_gtk_Menus_get_interface.” to glib-2-76

See merge request GNOME/glib!3531
2023-08-14 12:45:30 +00:00
André
572f8ab534 gmenuexporter: synchronization in org_gtk_Menus_get_interface.
Protects the mutation inside org_gtk_Menus_get_interface with
g_once_init_{enter,leave}.

Fixes #3051.
2023-08-14 09:15:29 +01:00
Philip Withnall
f522c3f94d
2.76.4
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-07-06 16:39:47 +01:00
Michael Catanzaro
3ed76cbbbd Merge branch 'backport-3473-errno-futex-glib-2-76' into 'glib-2-76'
Backport !3473 ”glib: reset errno to 0 when futex() returns EAGAIN” to glib-2-76

See merge request GNOME/glib!3479
2023-07-05 14:55:53 +00:00
Philip Withnall
ede36ac6ab Merge branch 'backport-3482-android-statx-glib-2-76' into 'glib-2-76'
Backport !3482 “glocalfileinfo: Fix incorrect use of struct statx.st_mtimensec on Android” to glib-2-76

See merge request GNOME/glib!3492
2023-07-05 11:58:15 +00:00
Luca Bacci
f3baa03b48 glocalfileinfo: Fix GLocalFileStat getters on MinGW x86
For some reason, `time_t` is defined as being 32 bits wide on that
platform, which causes truncation of the timestamps from `struct stat`.

Avoid that problem by consistently using a 64-bit return value from the
`struct stat` accessors.

Helps: #3039
2023-07-04 17:19:50 +01:00
Philip Withnall
4a9c00fa94 glocalfileinfo: Delete some redundant code
`_g_stat_has_field (statbuf, G_LOCAL_FILE_STAT_FIELD_ATIME)` will always
return `TRUE` on Windows (since it uses a basic `struct stat`), so the
platform-inspecific code is equivalent to the Windows-specific code.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-07-04 17:19:49 +01:00
Philip Withnall
0feee5b670 glocalfileinfo: Fix incorrect use of struct statx.st_mtimensec on Android
`GLocalFileStat` is a platform-specific abstraction around `struct stat`
or `struct statx`. If `struct statx` is available, it will use that by
preference as it has more features.

`glocalfileinfo.c` was, in some places, incorrectly accessing the fields
of `GLocalFileStat` directly rather than through its `_g_stat_*()`
getters. While it correctly accounted for the platform-specific
differences between `st_mtimensec` and `st_mtim.tv_nsec`, it hadn’t been
updated to deal with `stx_mtime`.

On Android, `st_mtimensec` is defined as a fallback for
`st_mtim.tv_nsec` (even though it doesn’t need to be). This caused GLib
to take the `st_mtimensec` code path rather than the `stx_mtime` code
path, and hence try to dereference `st_mtim` in a `struct statx`.

Fix that by correctly using the `_g_stat_*()` getters consistently.

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

Fixes: #3039
2023-07-04 17:19:49 +01:00
Bruce Cowan
2d3bcc9401 Update British English translation 2023-07-02 20:09:17 +00:00
Michael Catanzaro
2c97a0c06d Merge branch 'wip/pwithnall/backport-3468-macos-spawn-crash-glib-2-76' into 'glib-2-76'
Backport !3468 “Avoid stack overflow in gspawn on macOS” to glib-2-76

See merge request GNOME/glib!3480
2023-06-28 15:36:49 +00:00
Dario Saccavino
9f5590aee1 Avoid stack overflow in gspawn on macOS 2023-06-28 14:43:32 +01:00
Daniel P. Berrange
b74ff41bef glib: reset errno to 0 when futex() returns EAGAIN 2023-06-28 12:47:18 +01:00
Dušan Kazik
49c2fe77c1 Update Slovak translation 2023-06-14 13:52:23 +00:00
Leônidas Araújo
7f8bb8a2ea Update Brazilian Portuguese translation 2023-06-01 18:25:13 +00:00
Marco Trevisan
5ae2d68ac3 Merge branch 'backport-3446-glib-compile-schemas-failed-glib-2-76' into 'glib-2-76'
Backport !3446 “glib-compile-resources: Fix non-ASCII arg parsing on Windows” to glib-2-76

See merge request GNOME/glib!3447
2023-05-24 08:57:31 +00:00
Daniyar Tleulin
6c6a844a50 glib-compile-schemas: Fix non-ASCII arg parsing on Windows
When the source directory contains non-ASCII symbols,
argument parsing previously failed on MINGW64.

Fixes: #3003
2023-05-23 18:21:29 +01:00
Daniyar Tleulin
7e41ac18da glib-compile-resources: Fix non-ASCII arg parsing on Windows
When the source directory contains non-ASCII symbols,
argument parsing previously failed on MINGW64.

Fixes: #3003
2023-05-23 18:21:29 +01:00
Philip Withnall
69e209764b
2.76.3
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-05-23 11:55:59 +01:00
Emmanuele Bassi
791495e5b9 Merge branch 'backport-3430-gdb-fix-glib-2-76' into 'glib-2-76'
Backport !3430 “gobject_gdb.py: fix regression caused by bfbe7127d5” to glib-2-76

See merge request GNOME/glib!3434
2023-05-16 12:03:52 +00:00
Nelson Benítez León
0647121b38 gobject_gdb.py: fix regression caused by bfbe7127d5
commit bfbe7127d5 which did a code refactor in
gobject_gdb.py introduced a bug by failing to
return the signal name when a signal had no
'detail', this was preventing pretty printing
name for signals with no 'detail'.
2023-05-16 11:31:35 +01:00
Philip Withnall
42203f089d Merge branch 'backport-3291-dbus-connection-refcounting-glib-2-76' into 'glib-2-76'
Backport !3291 “gdbusconnection: Fix double unref on timeout/cancel sending a message” to glib-2-76

See merge request GNOME/glib!3427
2023-05-09 17:28:17 +00:00
Philip Withnall
60e06dd828 gdbusconnection: Improve refcount handling of timeout source
The ref on the timeout source owned by `SendMessageData` was being
dropped just after attaching the source to the main context, leaving it
unowned in that struct. That meant the only ref on the source was held
by the `GMainContext` it was attached to.

This ref was dropped when returning `G_SOURCE_REMOVE` from
`send_message_with_reply_timeout_cb()`. Before that happens,
`send_message_data_deliver_error()` is called, which normally calls
`send_message_with_reply_cleanup()` and destroys the source.

However, if `send_message_data_deliver_error()` is called when the
message has already been delivered, calling
`send_message_with_reply_cleanup()` will be skipped. This leaves the
source pointer in `SendMessageData` dangling, which will cause problems
when `g_source_destroy()` is subsequently called on it.

I’m not sure if it’s possible in practice for this situation to occur,
but the code certainly does nothing to prevent it, and it’s easy enough
to avoid by keeping a strong ref on the source in `SendMessageData`.

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

Helps: #1264
2023-05-09 18:10:16 +01:00
Philip Withnall
c4055424a4 gdbusconnection: Rearrange refcount handling of map_method_serial_to_task
It already implicitly held a strong ref on its `GTask` values, but
didn’t have a free function set so that they would be automatically
unreffed on removal from the map.

This meant that the functions handling removals from the map,
`on_worker_closed()` (via `cancel_method_on_close()`) and
`send_message_with_reply_cleanup()` had to call unref once more than
they would otherwise.

In `send_message_with_reply_cleanup()`, this behaviour depended on
whether it was called with `remove == TRUE`. If not, it was `(transfer
none)` not `(transfer full)`. This led to bugs in its callers.

For example, this led to a direct leak in `cancel_method_on_close()`, as
it needed to remove tasks from `map_method_serial_to_task`, but called
`send_message_with_reply_cleanup(remove = FALSE)` and erroneously didn’t
call unref an additional time.

Try and simplify it all by setting a `GDestroyNotify` on
`map_method_serial_to_task`’s values, and making the refcount handling
of `send_message_with_reply_cleanup()` not be conditional on its
arguments.

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

Helps: #1264
2023-05-09 18:10:16 +01:00
Philip Withnall
ffbb66e263 gdbusprivate: Use G_SOURCE_REMOVE in a source callback
This is equivalent to the current behaviour, but a little clearer in its
meaning.

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

Helps: #1264
2023-05-09 18:10:16 +01:00