Commit Graph

23917 Commits

Author SHA1 Message Date
Egor Bychin
c590938ba9 gtype: Fix pointer being dereferenced despite NULL check 2021-10-18 13:20:48 +01:00
Egor Bychin
3d80917578 gvariant: Fix pointers being dereferenced despite NULL checks 2021-10-18 13:20:48 +01:00
Egor Bychin
d25f5c0dfb gvariant: Fix memory leak on a TYPE_CHECK failure 2021-10-18 13:20:48 +01:00
Egor Bychin
88604931bb gslice: Fix page size being limited to int instead of gsize 2021-10-18 13:20:48 +01:00
Egor Bychin
644c9b964d gmessages: Add check for a localtime function return value 2021-10-18 13:20:48 +01:00
Egor Bychin
da1d64cb4d gkeyfile: Remove unreachable code 2021-10-18 13:20:48 +01:00
Egor Bychin
4d8c5b6d77 gbacktrace: Fix fcntl command arguments not being checked 2021-10-18 13:20:48 +01:00
Egor Bychin
f4ea12c6b4 gsocks5proxy: Fix buffer overflow on a really long domain name 2021-10-18 13:20:48 +01:00
Egor Bychin
567fae6e0b gsocket: Add ignorant of an fcntl return value 2021-10-18 13:20:48 +01:00
Egor Bychin
8d056da0bf gsettings-mapping: Fix HANDLE being treated as unsigned 2021-10-18 13:20:48 +01:00
Egor Bychin
e81c9098b0 gproxyaddressenumerator: Fix string leakage on an invalid input 2021-10-18 13:20:48 +01:00
Egor Bychin
b293fc5376 gopenuriportal: Fix GVariantBuilder and string leakage on g_open failure 2021-10-18 13:20:48 +01:00
Egor Bychin
5eb4e095c7 gmarshal-internal: Fix string leakage due to misplaced check 2021-10-18 13:20:48 +01:00
Egor Bychin
55dea0fd8d glocalfileinfo: Fix atime/mtime mix due to bad copy/paste 2021-10-18 13:20:48 +01:00
Egor Bychin
7b582a9993 glocalfile: Fix g_stat return value not being checked 2021-10-18 13:20:48 +01:00
Egor Bychin
5796babc5c gdbusauthmechanismsha1: Fix pointer being freed after being NULLed 2021-10-18 13:20:48 +01:00
Gleb Popov
881b4c215f Do not try to access errno after calling getpwnam_r. 2021-09-28 11:40:37 +01:00
Emmanuele Bassi
25009189d1 Merge branch 'backport-2266-fix-uninit-variable-glib-2-70' into 'glib-2-70'
Backport !2266 “fix uninitial variable” to glib-2-70

See merge request GNOME/glib!2271
2021-09-27 14:01:34 +00:00
liuyangming
8d884c21bf fix uninitial variable 2021-09-27 14:40:18 +01:00
Simon McVittie
53b70ce88c Merge branch 'backport-2244-utils-crash-glib-2-70' into 'glib-2-70'
Backport !2244 “gutils: Avoid segfault in g_get_user_database_entry” to glib-2-70

See merge request GNOME/glib!2262
2021-09-25 11:00:03 +00:00
Jamie Bainbridge
47114f52dd gutils: Avoid segfault in g_get_user_database_entry
g_get_user_database_entry() capitalises the first letter of pw_name
with g_ascii_toupper (pw->pw_name[0]).

However, the manpage for getpwnam() and getpwuid() says the result of
those calls "may point to a static area". GLib is then trying to edit
static memory which belongs to a shared library, so segfaults.

The reentrant variants of the above calls are supposed to fill the user
buffer supplied to them, however Michael Catanzaro also found a bug in
systemd where the data is not copied to the user buffer and still points
to static memory, resulting in the same sort of segfault. See:
https://github.com/systemd/systemd/issues/20679

Solve both these cases in GLib by copying pw_name off to a temporary
variable, set uppercase on that variable, and use the variable to join
into the desired string. Free the variable after it is no longer needed.

Signed-off-by: Jamie Bainbridge <jamie.bainbridge@gmail.com>
2021-09-22 14:57:50 +01:00
Emmanuele Bassi
0d0a993785 Merge branch 'backport-2257-object-manager-docs-glib-2-70' into 'glib-2-70'
Backport !2257 “Fix documentation for g_dbus_object_manager_get_object().” to glib-2-70

See merge request GNOME/glib!2259
2021-09-21 10:40:35 +00:00
Robert Ancell
f86488c1e6 Fix documentation for g_dbus_object_manager_get_object().
The class in the documentation is true for GDBusObjectManagerClient, but not for GDBusObjectManagerServer.
2021-09-21 11:20:26 +01:00
Emmanuele Bassi
6918c035ce Merge branch 'backport-2254-object-set-performance-glib-2-70' into 'glib-2-70'
Backport !2254 “Small optimization for g_object_set” to glib-2-70

See merge request GNOME/glib!2256
2021-09-20 13:46:04 +00:00
Matthias Clasen
1197b1362c Small optimization for g_object_setv
No need to call memset in the loop, we can just
initialize all the values in one go.

GtkBuilder is now using g_object_setv, so this
may improve application start times a bit.
2021-09-20 13:29:49 +01:00
Matthias Clasen
ff095d252d Small optimization for g_object_set
We've already followed the redirection, no need
to check for that again - just avoid notifying
non-readable properties.
2021-09-20 13:29:49 +01:00
Matthias Clasen
5f64478a68 GString: Bump minimum size
GString starts out at a size of 2, which is just
not useful. Bump the minimum size to 64 to cut
down on the number of tiny reallocations we do.
2021-09-20 10:10:19 +01:00
Philip Withnall
861afbe639 Merge branch 'main' into 'main'
gdesktopappinfo: Do not call xterm when it does not exist, inform the caller the launch failed

See merge request GNOME/glib!2245
2021-09-17 10:28:44 +00:00
Philip Withnall
6fd4f36bac 2.70.0
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-09-17 11:15:53 +01:00
Zander Brown
1da68b3f06 Update British English translation 2021-09-16 16:45:30 +00:00
Philip Withnall
e3e5a06d2b Merge branch 'wip/lantw/ci-Replace-FreeBSD-11-with-FreeBSD-13' into 'main'
ci: Replace FreeBSD 11 with FreeBSD 13

See merge request GNOME/glib!2248
2021-09-15 11:43:45 +00:00
Ting-Wei Lan
e99597414c ci: Replace FreeBSD 11 with FreeBSD 13
FreeBSD 11 will go EOL in a month, and FreeBSD 13 was released several
months ago. Remove the FreeBSD 11 job and add a FreeBSD 13 job.
2021-09-13 12:25:38 +08:00
Piotr Drąg
f763f2b7cb Update Polish translation 2021-09-11 13:17:25 +00:00
Alan Mortensen
22a43dd22d Updated Danish translation 2021-09-11 14:40:54 +02:00
Balázs Úr
aee274986a Update Hungarian translation 2021-09-10 20:19:11 +00:00
Goran Vidović
1436c15909 Update Croatian translation 2021-09-10 17:24:00 +00:00
Philipp Kiemle
205697dd25 Update German translation 2021-09-09 20:18:49 +00:00
Emin Tufan Çetin
f654e4f3bc Update Turkish translation 2021-09-09 18:58:19 +00:00
shironeko
b60cd327fe gdesktopappinfo: Return failure rather than blindly call xterm
Instead of calling xterm when it clearly does not exist and causes a silent error,
inform the user that the launch failed so they can take the right action.
2021-09-09 10:32:44 -04:00
Charles Monzat
9f102c22d4 Update French translation 2021-09-09 06:29:37 +00:00
Anders Jonsson
44666880ad Update Swedish translation 2021-09-07 17:43:09 +00:00
Philip Withnall
73c217dec2 2.69.3
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-09-07 12:24:07 +01:00
Philip Withnall
573c629bec Merge branch 'readme-release-signing' into 'main'
docs: Add a note about git-evtag to SECURITY.md

See merge request GNOME/glib!2110
2021-09-07 11:21:15 +00:00
Philip Withnall
b8160ce18b docs: Add a note about git-evtag to SECURITY.md 2021-09-07 11:21:12 +00:00
Emmanuele Bassi
21a27f4eb7 Merge branch '2425-settings-schema-range-check' into 'main'
gsettingsschema: Fix docs for g_settings_schema_key_range_check()

Closes #2425

See merge request GNOME/glib!2160
2021-09-07 10:59:09 +00:00
Philip Withnall
c9b1e6654e Merge branch 'gcc-suppress-deprecated-2' into 'main'
Fix false deprecation warnings on old GCC/MSVC

Closes #2472

See merge request GNOME/glib!2234
2021-09-07 10:45:06 +00:00
Evan Miller
508352339a Fix false deprecation warnings on old GCC/MSVC
Closes #2472
2021-09-07 11:21:20 +01:00
Philip Withnall
b52de547cb Merge branch '2481-power-profile-default-value' into 'main'
gpowerprofilemonitorportal: Set property value by default

Closes #2481

See merge request GNOME/glib!2241
2021-09-07 10:16:40 +00:00
Philip Withnall
4f62fdfd29 tests: Fix subsequent tests after first power-profile test failure
If the first power-profile installed test fails (for example, because
xdg-desktop-portal isn’t available), correctly tear down the dbusmock
object, or it will cause setUp() to fail when the next test in the suite
is run.

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

Helps: #2481
2021-09-06 18:57:06 +01:00
Philip Withnall
d051ef1611 gpowerprofilemonitorportal: Set property value by default
When first creating the monitor, correctly set its property value to the
value from the portal, rather than waiting for the portal value to
change to set it.

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

Fixes: #2481
2021-09-06 18:56:12 +01:00