1. 24 Nov, 2020 1 commit
  2. 08 Jun, 2020 1 commit
  3. 03 Jun, 2020 1 commit
  4. 26 May, 2020 1 commit
  5. 24 May, 2020 1 commit
    • Xiao Deng's avatar
      Return NULL from plist_copy() if passed a NULL pointer · ea5b54b4
      Xiao Deng authored
      This will prevent an assert if a NULL pointer is passed, and can make
      writing some code easier and cleaner without the need for a NULL check.
      For example, plist_copy(plist_dict_get_item(dict, "abc")) would give us
      a copy of the dict's node if the dict has a value for the given key, or
      NULL without any further checks.
      ea5b54b4
  6. 21 May, 2020 1 commit
  7. 11 May, 2020 2 commits
  8. 07 Nov, 2019 1 commit
  9. 13 Aug, 2019 1 commit
  10. 09 Aug, 2019 1 commit
    • Nikias Bassen's avatar
      Make sure to copy hash table entries properly when cloning array/dict nodes · e1a5d60e
      Nikias Bassen authored
      As mentioned in #142, plist_copy_node() was not correctly handling the hash
      tables when cloning array or dict nodes; it incorrectly filled the hash table
      with the original child node info, which effectively would lead to a
      segmentation fault / UaF if the original array/dict would be freed followed
      by an attempt to access an element in the new hash table.
      e1a5d60e
  11. 19 May, 2019 2 commits
  12. 18 May, 2019 3 commits
  13. 16 May, 2019 1 commit
  14. 21 Jan, 2019 1 commit
    • Nikias Bassen's avatar
      plist: Add iterator for #PLIST_ARRAY nodes · 84d6af8f
      Nikias Bassen authored
      Similar to #PLIST_DICT, an iterator can now be used for #PLIST_ARRAY
      nodes. Get an iterator with plist_array_new_iter() and use
      plist_array_next_item() to iterate over the elements.
      84d6af8f
  15. 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
  16. 10 Dec, 2018 1 commit
  17. 07 Feb, 2017 1 commit
  18. 05 Feb, 2017 1 commit
  19. 27 Nov, 2016 1 commit
  20. 18 Nov, 2016 1 commit
  21. 22 Oct, 2016 1 commit
  22. 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
  23. 08 Sep, 2016 1 commit
  24. 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
  25. 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
  26. 20 Apr, 2016 1 commit
  27. 23 Jan, 2015 1 commit
  28. 03 Oct, 2014 1 commit
  29. 20 May, 2014 2 commits
  30. 02 Apr, 2014 1 commit
  31. 19 Mar, 2014 2 commits
  32. 12 Dec, 2013 1 commit