Commit Graph

19111 Commits

Author SHA1 Message Date
Claude Paroz
ef45c909db Update French translation 2018-08-12 19:03:17 +00:00
Emmanuele Bassi
e49f9c9cd7 Merge branch '225-iso-8601-test-tz' into 'master'
tests: Explicitly set TZ=UTC for g_time_val_from_iso8601() testing

See merge request GNOME/glib!243
2018-08-12 11:55:08 +00:00
Emin Tufan Çetin
e98401f90f Update Turkish translation 2018-08-12 10:20:09 +00:00
Piotr Drąg
ae6439c83a Update Polish translation 2018-08-12 01:21:05 +02:00
Philip Withnall
f92359b593 Merge branch 'wjt/glib-mkenums-filename-basename-in-fhead-ftail' into 'master'
glib-mkenums: forbid @filename@/@basename@ in fhead and ftail

See merge request GNOME/glib!241
2018-08-11 21:25:05 +00:00
Philip Withnall
b1bfebc61c tests: Explicitly set TZ=UTC for g_time_val_from_iso8601() testing
Some of the test vectors don’t specify a timezone, so the local one is
used; the comparisons to the expected results (which are in UTC) then
fail.

See discussion in
https://gitlab.gnome.org/GNOME/glib/merge_requests/225.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-11 22:00:52 +01:00
Philip Withnall
4afe429d7c gspawn: Use fcntl() to work around systems which don’t support O_CLOEXEC
Somehow, we are still limping along with partial support for OS X
<10.7.

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

https://gitlab.gnome.org/GNOME/glib/issues/1488
2018-08-11 21:52:17 +01:00
Will Thompson
de62a95d5e
glib-mkenums: improve and correct argument documentation
ftail is not per-input-file, it is the footer for the entire output
file.

You cannot have fewer informations.
2018-08-10 17:18:36 +01:00
Will Thompson
7928fee2a8
glib-mkenums: don't support @filename@/@basename@ in fhead/ftail
As discussed in
https://gitlab.gnome.org/GNOME/glib/merge_requests/135#note_253986 it
doesn't really make sense to support these outside the templates for any
particular header file. Leave them unsubstituted, with a warning.
2018-08-10 17:05:59 +01:00
Will Thompson
cbd335c8c9
tests: mkenums: placate flake8 2018-08-10 17:05:59 +01:00
Will Thompson
12a2a984f2
tests: refactor running glib-mkenums
Part of runMkenumsWithHeader() was duplicated in test_reproducible(),
and would otherwise need to be duplicated again in upcoming tests.  Many
places duplicated decoding stdout/stderr and checking the exit code.

Introduce a named tuple for the returned fields; and factor out writing
a template file to pass with --template.
2018-08-10 17:05:59 +01:00
Xavier Claessens
cce309aebb Merge branch 'ossfuzz-9815-time-signed-arithmetic' into 'master'
gtimer: Ensure arithmetic is correctly signed for ISO 8601 parsing

See merge request GNOME/glib!240
2018-08-10 13:35:36 +00:00
Philip Withnall
8c844291b7 gtimer: Ensure arithmetic is correctly signed for ISO 8601 parsing
When calculating the value of a timezone offset, ensure that any offsets
done with negative numbers are done in a signed integer.

oss-fuzz#9815

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-10 10:43:37 +01:00
Philip Withnall
a9108f8bfd gvariant: Fix more bounds checking in GVariant text format parser
token_stream_prepare() was over-reading at the start of bytestring
literals (`b'blah'`).

Add tests for that, and for some other situations regarding bytestring
literal parsing, in order to try and get full branch coverage of that
bit of code.

oss-fuzz#9805

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-10 10:30:13 +01:00
Emmanuele Bassi
0d271223d8 Merge branch '1481-variant-parse-overflow' into 'master'
gvariant: Fix bounds checking in GVariant text format parser

Closes #1481

See merge request GNOME/glib!236
2018-08-09 10:25:48 +00:00
LRN
8defa46e6e Merge branch 'issue-1452' into 'master'
Issue 1452

Closes #1452

See merge request GNOME/glib!235
2018-08-09 00:25:05 +00:00
Philip Withnall
10ee7301e8 gvariant: Fix bounds checking in GVariant text format parser
The token_stream_peek() functions were not doing any bounds checking, so
could potentially read 1 byte off the end of the input blob. This was
never noticed, since the input stream is almost always a nul-terminated
string. However, g_variant_parse() does allow non-nul-terminated strings
to be used with a @limit parameter, and the bugs become apparent under
valgrind if that parameter is used.

This includes modifications to the test cases to cover the
non-nul-terminated case.

Spotted by ossfuzz.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-09 01:08:46 +01:00
Руслан Ижбулатов
075bb0f751 W32: consider NTFS mounpoints to be symlinks
While mountpoints are *not* symlinks, strictly speaking,
they works in a similar enough way, so consider them to be
symlinks for the purpose of querying local file info.
2018-08-08 23:41:07 +00:00
Руслан Ижбулатов
929844fdf7 W32: correctly use st_ctime
On Windows st_ctime field is the file creation time.
POSIX mandates that field to be the file state change time.
Naturally, glib code interpreted st_ctime as POSIX suggested,
and the result was bad.
Fix this by introducing special W32-only logic for setting
attributes from st_ctime field.

Fixes issue #1452.
2018-08-08 23:41:02 +00:00
Emmanuele Bassi
291bb0c584 Merge branch '1433-rename-timezones-in-tests' into 'master'
tests: Don’t use a potentially-existent timezone in a test for failure

Closes #1433

See merge request GNOME/glib!213
2018-08-08 22:31:07 +00:00
Christoph Reiter
3693bc52ad Merge branch 'gtaskfix' into 'master'
DOC: Documentation fix in GTask description

See merge request GNOME/glib!234
2018-08-08 05:34:27 +00:00
Pavlo Solntsev
7e2dfa8c44 DOC: Documentation fix in GTask description 2018-08-08 00:17:15 -05:00
Philip Withnall
bc0d624245 Merge branch 'xclaesse/glib-meson-cross-doc'
Closes #1363

See merge request GNOME/glib!232
2018-08-07 16:53:08 +01:00
Xavier Claessens
f046801217 Meson: Update cross compilation doc
(Modified by Philip Withnall <withnall@endlessm.com> to improve
formatting on original.)

Closes #1363
2018-08-07 16:52:49 +01:00
Xavier Claessens
0498b43489 Merge branch '1446-g_test_init-docs' into 'master'
gtestutils: Mention G_DISABLE_ASSERT in documentation for g_test_init()

Closes #1446

See merge request GNOME/glib!212
2018-08-07 14:50:53 +00:00
Xavier Claessens
ba30f45d9a Merge branch 'timer-tests' into 'master'
Minor additions to gtimer.c tests

See merge request GNOME/glib!231
2018-08-07 14:43:43 +00:00
Michael Catanzaro
4536deb5af Add a new GTlsError to indicate protocol downgrade attacks
G_TLS_ERROR_MISC suffices, but it's nicer to have a new error here.
2018-08-07 08:20:03 -05:00
Philip Withnall
83c79eaf24 Merge branch 'smcv/glib-xfail'
Closes #1474

See merge request GNOME/glib!221
2018-08-07 12:24:16 +01:00
Simon McVittie
b8d751af3e testing: Exercise TAP output
(Tweaked by Philip Withnall <withnall@endlessm.com> to fix some minor
leaks, code formatting, and add a test comment.)

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-07 12:20:37 +01:00
Emmanuele Bassi
9ce18521aa Merge branch '1475-atomic-casts' into 'master'
tests: Fix a -Wbad-function-cast warning in the atomic tests

Closes #1475

See merge request GNOME/glib!223
2018-08-07 10:06:04 +00:00
Philip Withnall
ab09a5f5a9 gdbusmessage: Fix a typo in the documentation
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-07 11:04:00 +01:00
Philip Withnall
6104e63ec4 tests: Improve branch coverage when testing g_time_val_add()
While I’m here…

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-07 11:03:39 +01:00
Philip Withnall
725eb1c86b tests: Add test for overflow handling in g_time_val_to_iso8601()
While I’m here…

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-07 11:03:39 +01:00
Emmanuele Bassi
7458defa9a Merge branch 'ossfuzz-9673-bookmark-date-overflow' into 'master'
gtimer: Add overflow checks to g_time_val_from_iso8601()

See merge request GNOME/glib!225
2018-08-07 09:57:21 +00:00
Philip Withnall
a5f824451f Merge branch 'mcatanzaro/tls-docs' into 'master'
Update TLS documentation

See merge request GNOME/glib!199
2018-08-07 09:46:30 +00:00
Philip Withnall
e5d9eca334 Merge branch 'gbytes-compare-docs' into 'master'
Fix up g_bytes_compare() documentation

See merge request GNOME/glib!229
2018-08-06 18:00:45 +00:00
Philip Withnall
2ab7fd2951 tests: Add more ISO 8601 parser tests
These come from looking at the code coverage data. We should now have
full branch coverage of the ISO 8601 parser.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-06 14:07:29 +01:00
Philip Withnall
fdccf5ff34 gtimer: Drop support for negative years from g_time_val_from_iso8601()
It never worked; we’ve always parsed the year with strtoul() (unsigned).
While negative years are supported by the ISO 8601 standard, they can
only be used by mutual agreement of the two parties interchanging data.
Moreover, they are not supported by GTimeVal, which is what we’re
filling with the results.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-06 14:07:29 +01:00
Philip Withnall
cefa66eb76 gtimer: Add overflow checks to g_time_val_from_iso8601()
The code was previously doing a few bits of arithmetic without checking
whether they would overflow, and hence not validating the date/time it
was parsing very strictly.

The parser is now not 100% strict, but should avoid any arithmetic
overflows which would cause an invalid result to be returned even though
g_time_val_from_iso8601() had returned TRUE.

oss-fuzz#9673

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-06 14:07:29 +01:00
Philip Withnall
b1fffbffbf gtimer: Document that g_time_val_from_iso8601() drops whitespace
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-06 14:07:29 +01:00
Philip Withnall
4eca2ac0ee tests: Add an overflow test for bookmark file dates
oss-fuzz#9673

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-06 14:07:27 +01:00
Emmanuele Bassi
eb65054aba Merge branch 'ossfuzz-9723-bookmark-leak' into 'master'
gbookmarkfile: Fix some more minor leaks when metadata elements are repeated

See merge request GNOME/glib!230
2018-08-06 12:54:04 +00:00
Philip Withnall
2860d4b50e gbookmarkfile: Fix some more minor leaks when metadata elements are repeated
oss-fuzz#9723

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-06 13:36:21 +01:00
Sebastian Dröge
a81b925d98 Fix up g_bytes_compare() documentation
It was declaring the opposite of what the function was actually doing,
and what every other comparison function is doing.
2018-08-06 15:20:02 +03:00
Aurimas Černius
0fba231a6b Updated Lithuanian translation 2018-08-05 23:25:59 +03:00
Christoph Reiter
7e6fb333f7 meson: define _FILE_OFFSET_BITS=64 for MinGW. See #1476
The autotools build set it by default and we use off_t in various places,
even on Windows. Also set it with the meson build to avoid any regressions.

Ideally we shouldn't use off_t and use 64bit capable API on Windows instead, so
we get large file support with MSVC as well.
2018-08-05 22:04:17 +02:00
Michael Catanzaro
08fe93589e Update documentation of g_tls_client_connection_set_use_ssl3()
We now send the fallback SCSV, meaning use of this function will cause
modern servers to immediately terminate the connection, so let's warn
API users to expect that behavior and be crystal clear that this
function should only be used as a fallback when a normal connection
attempt has already failed.

Also, the documentation is mostly duplicated between the property and
the function, so let's just reference the function documentation from
the property.
2018-08-04 16:33:28 -05:00
Simon McVittie
54a5f37f12 g_test_run: Document g_test_incomplete's similarity to g_test_skip
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-03 14:33:52 +01:00
Simon McVittie
0a180bb51b testing: Assert that test-case results are combined correctly
This repurposes the existing skip-all test as "combining", since it
is no longer entirely about runs where every test-case was skipped.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-03 14:30:10 +01:00
Simon McVittie
bbefa73997 testutils: Treat incomplete tests more like skipped tests
If a test is marked with g_test_incomplete(), then it is expected to
fail, so when it fails the test executable should still exit 0
(or possibly 77, if all tests are either skipped or incomplete).

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-08-03 14:28:21 +01:00