1. 23 Dec, 2018 1 commit
    • Nikias Bassen's avatar
      plist: Improve plist_dict_next_item() drastically by iterating on node list directly · 3f967317
      Nikias Bassen authored
      As Xiao Deng pointed out in #131, plist_dict_next_item() was very inefficient.
      For each iteration, node_nth_child() was called with the iterator value, which
      would walk through the child node list on EVERY iteration. If the dictionary
      is large this makes things very slow. More than that, after reaching the key
      node the code was calling node_nth_child() AGAIN (with iterator value + 1) to
      reach the value node, which would walk through the node list once more.
      This commit changes the iterator to be a node_t pointer so that the iteration
      is done on the node list directly.
      3f967317
  2. 10 Dec, 2018 1 commit
  3. 07 Feb, 2017 1 commit
  4. 05 Feb, 2017 1 commit
  5. 27 Nov, 2016 1 commit
  6. 18 Nov, 2016 1 commit
  7. 22 Oct, 2016 1 commit
  8. 18 Sep, 2016 1 commit
    • Nikias Bassen's avatar
      Change internal storage of PLIST_DATE values from struct timeval to double · 912cb459
      Nikias Bassen authored
      This removes the timeval union member from the plist_data_t structure.
      Since struct timeval is 2x64bit on 64bit platforms this member unnecessarily
      grew the union size to 16 bytes while a size of 8 bytes is sufficient.
      Also, on 32bit platforms struct timeval is only 2x32bit of size, limiting the
      range of possible time values. In addition the binary property list format
      also stores PLIST_DATE nodes as double.
      912cb459
  9. 08 Sep, 2016 1 commit
  10. 29 Jun, 2016 2 commits
    • Nikias Bassen's avatar
      xplist: Plug memory leak when converting PLIST_UID nodes to XML · 16f45a04
      Nikias Bassen authored
      In node_to_xml nodes of type PLIST_UID are temporarily converted
      to a PLIST_DICT for an appropriate XML output. Therefore a PLIST_KEY
      and a PLIST_UINT node is created and inserted into the PLIST_DICT
      node. Upon completion, the child nodes of the PLIST_DICT node are
      detached from the original node and freed, however the data of the
      child nodes - the key string and the uint value - are not.
      This commit fixes it.
      16f45a04
    • Nikias Bassen's avatar
      plist_data_compare: Make sure to compare the node sizes for integer nodes · acd226d1
      Nikias Bassen authored
      Without this check, e.g. the values -1 and 18446744073709551615 would yield in a
      match, since the comparison will just compare the uint64_t values. However, any
      value >= 9223372036854775808 and <= 18446744073709551615 is stored as a 128 bit
      value in binary plist format to make sure it is recognized as an unsigned value.
      We store it internally as a uint64_t value, but we set the size to 16 vs. 8
      accordingly; so this commit will make sure the binary plist optimization will
      not re-use matching uint64_t values of actually mismatching signed/unsigned values.
      acd226d1
  11. 12 May, 2016 2 commits
    • Christophe Fergeau's avatar
      Implement plist_from_memory() · 11d639f9
      Christophe Fergeau authored
      Rather than having everyone reimplement binary/XML plist detection by
      looking at the first bytes of the plist content, it's better to do this
      detection in libplist and hide that internal detail from library users.
      11d639f9
    • Christophe Fergeau's avatar
      Add plist_is_binary() · 449e27bf
      Christophe Fergeau authored
      It can be useful if one needs to know what type of plist a memory buffer
      contains.
      449e27bf
  12. 20 Apr, 2016 1 commit
  13. 23 Jan, 2015 1 commit
  14. 03 Oct, 2014 1 commit
  15. 20 May, 2014 2 commits
  16. 02 Apr, 2014 1 commit
  17. 19 Mar, 2014 2 commits
  18. 12 Dec, 2013 1 commit
  19. 16 Sep, 2012 2 commits
  20. 23 Apr, 2012 1 commit
  21. 27 May, 2011 1 commit
  22. 21 Jan, 2010 1 commit
  23. 19 Nov, 2009 2 commits
    • Christophe Fergeau's avatar
      don't leak GNodes in plist_free · 804032e9
      Christophe Fergeau authored
      Before recursing over its children, plist_free_node started by
      detaching the current GNode from its parent which means that
      calling g_node_destroy on the root of the tree was freeing only
      the top-level GNode while what was intended was to free the whole
      tree. Don't leak memory by not detaching children GNodes from their
      parents so that g_node_destroy on the toplevel GNode can clean
      everything.
      804032e9
    • Christophe Fergeau's avatar
      add missing break; in switch statement · d503698b
      Christophe Fergeau authored
      The 2nd missing break was harmless since it fell through the default: case
      which has a break, but it makes things more robust if we were ever to add
      new cases to this switch. The 1st missing break; was causing warnings in
      valgrind since we ended up calling strdup on a memory zone not containing
      a \0 character.
      d503698b
  24. 10 Nov, 2009 1 commit
  25. 28 Oct, 2009 2 commits
  26. 17 Oct, 2009 1 commit
  27. 13 Oct, 2009 1 commit
  28. 11 Oct, 2009 5 commits
  29. 10 Oct, 2009 1 commit