1. 14 Sep, 2016 1 commit
  2. 03 Mar, 2016 1 commit
  3. 22 Feb, 2016 1 commit
    • Hanno Böck's avatar
      GVariant text: fix scan of positional parameters · cc0b8bdf
      Hanno Böck authored
      The scanning to find the end of a positional parameter designator in
      GVariant text format (e.g. '%i') is currently broken in case the 'end'
      pointer is not specified.
      The scan is controlled by a somewhat complicated loop that needs to deal
      properly with cases like (123, %(ii)) [where '%(ii)' is to be taken
      together, but the final ')' not].
      This loop missed the case where a format string passed to
      g_variant_new_parsed() ended immediately after such a conversion, with a
      nul character.  In this case the 'end' pointer is NULL, so the only way
      we can find the end is by scanning for nul in the string.
      In case of g_variant_new_parsed() [which is what this code was designed
      to be used for], the bug is somewhat unlikely in practice: the only way
      that a valid text-form GVariant could ever contain a positional
      parameter replacement at the end of the string is if this positional
      parameter were the only thing being returned.  In that case, the user
      would likely have opted for a more direct approach.
      Unfortunately, this code is also active in the tokenisation phase of
      g_variant_parse(), before positional parameters are rejected as invalid
      for that case.  Anyone who calls this function with a nul-terminated
      string (and no end pointer) is vulnerable to a crash from malicious user
      input.  This can be seen, at the very least with many commandline tools:
        $ dconf write /x '%i'
        Segmentation fault
      We fix this problem by searching for the nul character in this case, in
      addition to comparing the end pointer.
      This problem is almost certainly limited to being able to cause crashes.
      The loop in question only performs reads and, in the security-sensitive
      case, the token will be quickly rejected after the loop is finished
      (since it starts with '%' and the 'app' pointer is unset).  This is
      further mitigated by the fact that there are no known cases of GVariant
      text format being used as part of a protocol at a privilege barrier.
  4. 28 Jan, 2016 1 commit
    • Chun-wei Fan's avatar
      gwin32.c: Avoid a GCC warning · ef7965b1
      Chun-wei Fan authored
      Add a pair of braces to make things more clear, to avoid a warning
      when -Wparentheses is used.
      Reported by Ignacio Casal Quinteiro.
  5. 20 Jan, 2016 4 commits
  6. 18 Jan, 2016 1 commit
    • Chun-wei Fan's avatar
      tests: Fix regex test conditions · 8c00a002
      Chun-wei Fan authored
      Commit 855594c4 changed the expected error for the regex
      /(?P<sub>foo)\g<sub/ for PCRE 8.38, but actually PCRE changed the error
      raised by this invalid regex in 8.37, so we should check for the new error
      from 8.37 and upwards.
      Please see comments #21 and #22 of bug 740573 regarding this commit.
  7. 14 Jan, 2016 1 commit
  8. 05 Jan, 2016 2 commits
  9. 22 Dec, 2015 1 commit
    • Chun-wei Fan's avatar
      g_application_run(): Fix on Windows When Using Bindings · 017dd9b3
      Chun-wei Fan authored
      As g_win32_get_command_line() calls CommandLineToArgvW() to acquire the
      arguments passed into a GApplication program, it actually returns the
      whole command line which is used to invoke the program, including the
      script interpreter and its flags when a script using GNOME bindings
      (e.g. PyGObject and so on) is being invoked.
      The issue here is that g_application_run() would most probably have
      trouble in the scripts scenario on Windows as it is likely unable to
      "recognize" the script interpreter, causing such scripts to fail to run.
      Largely based on the patch by Ray Donnelly <mingw.android@gmail.com>.
  10. 14 Dec, 2015 1 commit
  11. 23 Nov, 2015 1 commit
  12. 17 Nov, 2015 1 commit
  13. 12 Nov, 2015 1 commit
  14. 06 Nov, 2015 3 commits
  15. 05 Nov, 2015 1 commit
  16. 02 Nov, 2015 3 commits
  17. 27 Oct, 2015 2 commits
  18. 24 Oct, 2015 1 commit
    • Chun-wei Fan's avatar
      gwin32.c: Fix build on MinGW and earlier MSVC · 7e9c7a17
      Chun-wei Fan authored
      MinGW and pre-2008 Visual Studio does not have NTSTATUS automatically
      defined from including the normal Windows headers, which broke the
      build on these toolsets.  Fix this by including winternl.h, which will
      define NTSTATUS on these toolsets.
      This should fix bug 756875 for the glib-2-46 branch.
  19. 23 Oct, 2015 1 commit
    • Ignacio Casal Quinteiro's avatar
      win32: make sure bytes_read/written is set to 0 on error · 24366e15
      Ignacio Casal Quinteiro authored
      If we fail to PeekMessage or PostMessage we should make sure
      that the output parameter bytes_read/written is set 0 instead
      of being left uninitialized. This fixes an assertion in the io
      channel call where the following invariant is checked:
      (status == G_IO_STATUS_NORMAL) || (read_size == 0)
  20. 20 Oct, 2015 3 commits
  21. 18 Oct, 2015 1 commit
  22. 15 Oct, 2015 1 commit
  23. 14 Oct, 2015 6 commits
  24. 13 Oct, 2015 1 commit