1. 19 Mar, 2021 1 commit
    • Philip Withnall's avatar
      glib: Use g_memdup2() instead of g_memdup() in obvious places · 0ace82d7
      Philip Withnall authored
      
      
      Convert all the call sites which use `g_memdup()`’s length argument
      trivially (for example, by passing a `sizeof()` or an existing `gsize`
      variable), so that they use `g_memdup2()` instead.
      
      In almost all of these cases the use of `g_memdup()` would not have
      caused problems, but it will soon be deprecated, so best port away from
      it
      
      In particular, this fixes an overflow within `g_bytes_new()`, identified
      as GHSL-2021-045 (aka CVE-2021-27219) by GHSL team member Kevin Backhouse.
      
      Adapted for GLib 2.58 by Simon McVittie.
      Signed-off-by: Philip Withnall's avatarPhilip Withnall <pwithnall@endlessos.org>
      Fixes: CVE-2021-27219
      Fixes: GHSL-2021-045
      Helps: #2319
      (cherry picked from commit 0736b7c1
      
      )
      [Backport to 2.58: Omit changes to ghash.c, will be a separate commit]
      [Backport to 2.58: Omit changes to giochannel.c, not needed in this branch]
      [Backport to 2.58: Omit changes to uri test, not needed in this branch]
      Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
      0ace82d7
  2. 03 Aug, 2018 3 commits
  3. 31 Jul, 2018 1 commit
  4. 11 Jul, 2018 2 commits
  5. 29 May, 2018 1 commit
    • Emmanuele Bassi's avatar
      Add fuzzy floating point comparison macro · 0b4c2eef
      Emmanuele Bassi authored
      Add a test macro that allows comparing two floating point values for
      equality within a certain tolerance.
      
      This macro has been independently reimplemented by various projects:
      
       * Clutter
       * Graphene
       * colord
      
      #914
      0b4c2eef
  6. 27 Apr, 2018 1 commit
  7. 18 Dec, 2017 1 commit
  8. 13 Dec, 2017 2 commits
  9. 28 Nov, 2017 1 commit
  10. 12 Nov, 2017 1 commit
  11. 07 Nov, 2017 1 commit
  12. 11 Oct, 2017 1 commit
  13. 03 Oct, 2017 2 commits
  14. 03 Aug, 2017 2 commits
    • Daniel Macks's avatar
      gtest: Handle -s as explicit SKIP instead of inhibiting altogether · f591366e
      Daniel Macks authored
      Improves diagnostics and makes test transcripts easier to compare
      
      https://bugzilla.gnome.org/show_bug.cgi?id=769135
      f591366e
    • Philip Withnall's avatar
      Consistently save errno immediately after the operation setting it · 5cddde1f
      Philip Withnall authored
      Prevent the situation where errno is set by function A, then function B
      is called (which is typically _(), but could be anything else) and it
      overwrites errno, then errno is checked by the caller.
      
      errno is a horrific API, and we need to be careful to save its value as
      soon as a function call (which might set it) returns. i.e. Follow the
      pattern:
        int errsv, ret;
        ret = some_call_which_might_set_errno ();
        errsv = errno;
      
        if (ret < 0)
          puts (strerror (errsv));
      
      This patch implements that pattern throughout GLib. There might be a few
      places in the test code which still use errno directly. They should be
      ported as necessary. It doesn’t modify all the call sites like this:
        if (some_call_which_might_set_errno () && errno == ESOMETHING)
      since the refactoring involved is probably more harmful than beneficial
      there. It does, however, refactor other call sites regardless of whether
      they were originally buggy.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=785577
      5cddde1f
  15. 24 May, 2017 1 commit
    • Sébastien Wilmet's avatar
      glib/: LGPLv2+ -> LGPLv2.1+ · f9faac76
      Sébastien Wilmet authored
      All glib/*.{c,h} files have been processed, as well as gtester-report.
      
      12 of those files are not licensed under LGPL:
      
      	gbsearcharray.h
      	gconstructor.h
      	glibintl.h
      	gmirroringtable.h
      	gscripttable.h
      	gtranslit-data.h
      	gunibreak.h
      	gunichartables.h
      	gunicomp.h
      	gunidecomp.h
      	valgrind.h
      	win_iconv.c
      
      Some of them are generated files, some are licensed under a BSD-style
      license and win_iconv.c is in the public domain.
      
      Sub-directories inside glib/:
      
      	deprecated/: processed in a previous commit
      	glib-mirroring-tab/: already LGPLv2.1+
      	gnulib/: not modified, the code is copied from gnulib
      	libcharset/: a copy
      	pcre/: a copy
      	tests/: processed in a previous commit
      
      https://bugzilla.gnome.org/show_bug.cgi?id=776504
      f9faac76
  16. 05 Mar, 2017 1 commit
  17. 22 Nov, 2016 1 commit
  18. 09 Nov, 2016 1 commit
  19. 24 Oct, 2016 1 commit
  20. 12 Oct, 2016 1 commit
  21. 22 Jul, 2016 1 commit
  22. 17 Jul, 2016 1 commit
  23. 04 Jun, 2016 1 commit
  24. 27 Apr, 2016 1 commit
  25. 07 Nov, 2015 2 commits
  26. 31 Aug, 2015 7 commits
  27. 08 May, 2015 1 commit