Commit Graph

22221 Commits

Author SHA1 Message Date
Niklas Gürtler
aa0e120174 Make libelf dependency optional via meson feature 2020-10-01 13:47:36 +00:00
Philip Withnall
9bc61def1f Merge branch 'fix_warnings' into 'master'
Fix various signedness warnings

See merge request GNOME/glib!1645
2020-09-14 08:30:52 +00:00
Emmanuel Fleury
16773d2702 Fix a signedness problem in glib/tests/date.c
glib/tests/date.c:778:17: error: comparison of integer expressions of
  different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’

  778 |   for (i = 0; i < G_N_ELEMENTS (check_years); i++)
      |                 ^
2020-09-14 10:11:44 +02:00
Emmanuel Fleury
33148e6bc3 Fix a signedness problem in glib/tests/collate.c
glib/tests/collate.c:300:17: error: comparison of integer expressions
  of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’

  300 |   for (i = 0; i < G_N_ELEMENTS (test); i++)
      |                 ^
2020-09-14 10:11:44 +02:00
Emmanuel Fleury
d49586cfa3 Fix signedness error in glib/gspawn.c
glib/gspawn.c:2252:16: error: comparison of integer expressions of
  different signedness: ‘int’ and ‘gsize’ {aka ‘long unsigned int’}

 2252 |   if (argc + 2 > argv_buffer_len)
      |                ^
2020-09-14 10:11:44 +02:00
Emmanuel Fleury
33bfae70ac Fix signedness problem in glib/gutils.c
glib/gutils.c:998:26: error: comparison of integer expressions of
 different signedness: ‘glong’ {aka ‘long int’} and ‘long unsigned int’
  998 |       if (max > 0 && max <= G_MAXSIZE - 1)
      |                          ^~
2020-09-14 10:11:44 +02:00
Rūdolfs Mazurs
b696dccb20 Update Latvian translation 2020-09-13 08:54:05 +00:00
Ask Hjorth Larsen
1d1262e81a Updated Danish translation 2020-09-12 01:11:23 +02:00
Philip Withnall
c3eda78ada Merge branch '2194-winhttp-file-display-name' into 'master'
gwinhttpfile: Set display-name attribute on file info

Closes #2194

See merge request GNOME/glib!1644
2020-09-11 09:49:04 +00:00
Philip Withnall
9d859f001d gutf8: Fix a typo in the docs for g_utf16_to_utf8()
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-09-10 14:14:32 +01:00
Philip Withnall
6f9b379c08 gwinhttpfile: Set display-name attribute on file info
It is not allowed to be `NULL` or unset if requested by the file
attribute matcher. Derive it from the basename. This doesn’t handle the
situation of a failed UTF-16 to UTF-8 conversion very well, but will at
least return something.

Note that the `g_filename_display_basename()` function can’t be used as
`GWinHttpFile` provides its URI in UTF-16 rather than in the file system
encoding.

This fixes a crash when using GIMP on Windows. Thanks to lillolollo for
in-depth debugging assistance.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #2194
2020-09-10 14:14:32 +01:00
Sebastian Dröge
b7c75f78ab Merge branch '2077-pointer-arithmetic' into 'master'
gfileutils: Correct operator precedence to avoid undefined pointer maths

Closes #2077

See merge request GNOME/glib!1526
2020-09-10 11:22:44 +00:00
Philip Withnall
aea8c91837 Merge branch 'wip/2164-dbus-sha1-timeout' into 'master'
gdbusauthmechanismsha1: Use the same timeouts as libdbus

Closes #2164

See merge request GNOME/glib!1641
2020-09-10 11:13:52 +00:00
Philip Withnall
f010a8c983 Merge branch 'coverity-fixes' into 'master'
Minor Coverity fixes

See merge request GNOME/glib!1643
2020-09-10 11:13:01 +00:00
Philip Withnall
c2c12e4292 2.66.0
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-09-10 11:39:49 +01:00
Milo Casagrande
bca2bdd867 Update Italian translation 2020-09-10 09:17:23 +00:00
Goran Vidović
496858c904 Update Croatian translation 2020-09-09 19:28:45 +00:00
Goran Vidović
81fd3fe4d9 Update Croatian translation 2020-09-08 21:17:06 +00:00
Goran Vidović
bd5efc8b0e Update Croatian translation 2020-09-08 16:09:23 +00:00
Philip Withnall
cbf72f0dc9 ci: Add model file for Coverity
This isn’t used in the build at all, it’s just a copy of the model file
which is uploaded in our Coverity configuration. This should be kept up
to date with changes in the file on the Coverity servers.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-09-08 10:34:54 +01:00
Philip Withnall
f19cb44b98 guri: Remove unnecessary NULL pointer check
`uri` is always non-`NULL` by the time the `fail` label is reached, so
drop the `NULL` pointer check. Inline the `fail` code since it’s only
used from two places.

Coverity CID: #1430970
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-09-08 09:59:24 +01:00
Goran Vidović
2effedd75b Update Croatian translation 2020-09-07 21:58:14 +00:00
Balázs Meskó
7fa8d5f746 Update Hungarian translation 2020-09-07 20:09:27 +00:00
Goran Vidović
6f69a79062 Update Croatian translation 2020-09-07 19:08:25 +00:00
Simon McVittie
92183fb703 gdbusauthmechanismsha1: Use the same timeouts as libdbus
For interoperability with libdbus, we want to use compatible timeouts.
In particular, this fixes a spurious failure of the `gdbus-server-auth`
test caused by libdbus and gdbus choosing to expire the key (cookie) at
different times, as diagnosed by Thiago Macieira. Previously, the libdbus
client would decline to use keys older than 7 minutes, but the GDBus
server would not generate a new key until the old key was 10 minutes old.

For completeness, also adjust the other arbitrary timeouts in the
DBUS_COOKIE_SHA1 mechanism to be the same as in libdbus. To make it
easier to align with libdbus, create internal macros with the same names
and values used in dbus-keyring.c.

* maximum time a key can be in the future due to clock skew between
  systems sharing a home directory
  - spec says "a reasonable time in the future"
  - was 1 day
  - now 5 minutes
  - MAX_TIME_TRAVEL_SECONDS

* time to generate a new key if the newest is older
  - spec says "If no recent keys remain, the server may generate a new
    key", but that isn't practical, because in reality we need a grace
    period during which an old key will not be used for new authentication
    attempts but old authentication attempts can continue (in practice both
    libdbus and GDBus implemented this logic)
  - was 10 minutes
  - now 5 minutes
  - NEW_KEY_TIMEOUT_SECONDS

* time to discard old keys
  - spec says "the timeout can be fairly short"
  - was 15 minutes
  - now 7 minutes
  - EXPIRE_KEYS_TIMEOUT_SECONDS

* time allowed for a client using an old key to authenticate, before
  that key gets deleted
  - was at least 5 minutes
  - now at least 2 minutes
  - at least (EXPIRE_KEYS_TIMEOUT_SECONDS - NEW_KEY_TIMEOUT_SECONDS)

Based on a merge request by Philip Withnall.

Fixes: #2164
Thanks: Philip Withnall
Thanks: Thiago Macieira
Signed-off-by: Simon McVittie <smcv@collabora.com>
2020-09-07 11:29:06 +01:00
Anders Jonsson
8a3f570e6f Update Swedish translation 2020-09-06 15:09:33 +00:00
Dušan Kazik
91027d4b35 Update Slovak translation 2020-09-06 11:27:49 +00:00
Goran Vidović
8be23b0017 Update Croatian translation 2020-09-05 21:56:16 +00:00
Марко Костић
602edf1b3c Update Serbian translation 2020-09-04 07:13:11 +00:00
Sebastian Dröge
83681d6216 Merge branch '2200-po-makefile-tabs' into 'master'
po: Fix tab indentation in Makefile.in.in

Closes #2200

See merge request GNOME/glib!1640
2020-09-03 09:48:03 +00:00
Philip Withnall
d0b8d671f1 po: Fix tab indentation in Makefile.in.in
This file is still installed for other projects to use.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #2200
2020-09-03 10:28:59 +01:00
Patrick Griffis
6f6462ce00 Merge branch 'tingping/fix-uri-not-nulling' into 'master'
guri: Fix user passed to g_uri_split_with_user() not being NULL'd

See merge request GNOME/glib!1639
2020-09-02 22:57:40 +00:00
Patrick Griffis
8b319a687b guri: Fix user passed to g_uri_split_with_user() not being NULL'd 2020-09-02 15:43:58 -05:00
Philip Withnall
47488cc1a0 2.65.3
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-09-02 16:48:52 +01:00
Sebastian Dröge
054ef4ddf7 Merge branch '2191-scheduler-warnings' into 'master'
gthread: Only print scheduler setting warnings once

Closes #2191

See merge request GNOME/glib!1637
2020-09-02 15:28:17 +00:00
Philip Withnall
c8840ff9a8 gthread: Only print scheduler setting warnings once
If one thread pool thread fails to set its scheduler settings, it’s
likely that all the rest of them will fail for the same reason. Avoid
printing duplicate critical warnings in that case.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #2191
2020-09-02 16:09:12 +01:00
Philip Withnall
eba91d5c87 Merge branch 'big_O_notations' into 'master'
Big o notations

See merge request GNOME/glib!1025
2020-09-02 13:09:52 +00:00
Emmanuel Fleury
d27549b0f4 Add some notes on complexity in glib/gtree.c
Related to issue #3
2020-09-02 14:38:15 +02:00
Emmanuel Fleury
54c20c8532 Add some notes on complexity in glib/gsequence.c
Related to issue #3
2020-09-02 14:38:15 +02:00
Emmanuel Fleury
a62fcb9af1 Add some notes on complexity in glib/gqueue.c
Related to issue #3
2020-09-02 14:38:15 +02:00
Emmanuel Fleury
69e5e12c95 Add some notes on complexity in glib/gslist.c
Related to issue #3
2020-09-02 14:38:15 +02:00
Emmanuel Fleury
4d9cd832d1 Add some notes on complexity in glib/glist.c
Related to issue #3
2020-09-02 14:38:15 +02:00
Emmanuel Fleury
cbae555a98 Add some notes on complexity in glib/ghash.c
Related to issue #3
2020-09-02 14:38:10 +02:00
Emmanuel Fleury
34f03f01c8 Add some notes on complexity in glib/garray.c
Related to issue #3
2020-09-02 14:36:22 +02:00
Sebastian Dröge
b01bcd38a6 Merge branch '2197-option-group-limits' into 'master'
goption: Add a precondition to avoid GOptionEntry list overflow

Closes #2197

See merge request GNOME/glib!1638
2020-09-02 11:58:31 +00:00
Philip Withnall
63c5b62f0a goption: Add a precondition to avoid GOptionEntry list overflow
If the calling code adds more option entries than `G_MAXSIZE` then
there’ll be an integer overflow. This seems vanishingly unlikely (given
that all callers use static option entry lists), but add a precondition
anyway.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #2197
2020-09-02 12:48:37 +01:00
Mario Blättermann
14d9cde59e Update German translation 2020-09-02 11:31:42 +00:00
Simon McVittie
bdcf193c2e Merge branch 'cancellable-disable-assert' into 'master'
gcancellable: Mark a variable as unused if built with G_DISABLE_ASSERT

See merge request GNOME/glib!1635
2020-09-01 13:55:48 +00:00
Fabio Tomat
489941242e Update Friulian translation 2020-09-01 13:40:50 +00:00
Philip Withnall
30a31b21fb gcancellable: Mark a variable as unused if built with G_DISABLE_ASSERT
It’s only used in an assertion. This fixes a compiler warning.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-09-01 12:23:19 +01:00