Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2021-09-13 | Check availability of constructor attribute and use it on Windows in favor ↵ | Nikias Bassen | 1 | -16/+23 | |
of DllMain | |||||
2021-09-11 | windows: Make thread_once static and remove const qualifiers from ↵ | Nikias Bassen | 1 | -3/+3 | |
thread_once_t globals | |||||
2021-06-22 | [clang-tidy] Remove casts to the same type | Rosen Penev | 1 | -1/+1 | |
Found with google-readability-casting Signed-off-by: Rosen Penev <rosenp@gmail.com> | |||||
2021-06-22 | [clang-tidy] Avoid global non-const variables | Rosen Penev | 1 | -2/+2 | |
Found with cppcoreguidelines-avoid-non-const-global-variables Signed-off-by: Rosen Penev <rosenp@gmail.com> | |||||
2021-06-22 | [clang-tidy] Remove pointless const | Rosen Penev | 1 | -1/+1 | |
The const is actually misplaced. const plist_t evaluates to void *const instead of const void *. const qualification of the former makes no sense in function declarations. Found with misc-misplaced-const Signed-off-by: Rosen Penev <rosenp@gmail.com> | |||||
2020-11-24 | Improve code readability by not using else after return | Rosen Penev | 1 | -38/+40 | |
[clang-tidy] Found with readability-else-after-return Signed-off-by: Rosen Penev <rosenp@gmail.com> | |||||
2020-06-08 | Remove whitespace errors from all files | Martin Szulecki | 1 | -1/+1 | |
2020-06-03 | Remove pointless return in void functions | Rosen Penev | 1 | -10/+0 | |
[clang-tidy] Found with readability-redundant-control-flow Signed-off-by: Rosen Penev <rosenp@gmail.com> | |||||
2020-05-26 | Make plist_bool_val_is_true() return 0 instead of -1 if node is NULL or not ↵ | Nikias Bassen | 1 | -1/+1 | |
a PLIST_BOOLEAN | |||||
2020-05-25 | Return NULL from plist_copy() if passed a NULL pointer | Xiao Deng | 1 | -1/+1 | |
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. | |||||
2020-05-21 | Fix symbol mismatch between public header and interface (plist_bool_val_is_true) | Nikias Bassen | 1 | -1/+1 | |
2020-05-11 | Suppress compiler warning about memmem on Linux | Nikias Bassen | 1 | -0/+1 | |
2020-05-11 | Add plist_*_val_compare, plist_*_val_contains, etc. for the respective node ↵ | Nikias Bassen | 1 | -0/+231 | |
types ... except container node types like PLIST_ARRAY or PLIST_DICT. | |||||
2019-11-07 | Add plist_get_data_ptr() and plist_get_string_ptr() to the interface | Nikias Bassen | 1 | -0/+25 | |
2019-08-13 | plist: Remove unnecessary parameter from plist_copy_node() | Xiao Deng | 1 | -14/+6 | |
2019-08-09 | Make sure to copy hash table entries properly when cloning array/dict nodes | Nikias Bassen | 1 | -18/+22 | |
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. | |||||
2019-05-20 | plist_set_key_val(): prevent setting a key value that already exists in a ↵ | Nikias Bassen | 1 | -0/+5 | |
PLIST_DICT | |||||
2019-05-20 | Add plist_dict_item_get_key() to allow retrieving the key node for a given ↵ | Nikias Bassen | 1 | -0/+11 | |
item of a #PLIST_DICT | |||||
2019-05-19 | Add plist_array_item_remove() to allow removing an array's child node ↵ | Nikias Bassen | 1 | -0/+15 | |
without relying on the index | |||||
2019-05-19 | plist_array_get_item_index(): return UINT_MAX instead of 0 when node can't ↵ | Nikias Bassen | 1 | -1/+1 | |
be found | |||||
2019-05-19 | Add index lookup table for large PLIST_ARRAY nodes | Nikias Bassen | 1 | -11/+69 | |
2019-05-16 | Ignore invalid input in plist_get_*_val() to prevent unnecessary assertions | Nikias Bassen | 1 | -19/+50 | |
Also fixes #126 by skipping the strlen() in the assert() if for some reason NULL is returned as data | |||||
2019-01-21 | plist: Add iterator for #PLIST_ARRAY nodes | Nikias Bassen | 1 | -4/+34 | |
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. | |||||
2018-12-23 | plist: Improve plist_dict_next_item() drastically by iterating on node list ↵ | Nikias Bassen | 1 | -10/+8 | |
directly 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. | |||||
2018-12-10 | Remove node_iterator and operate on node list directly to improve memory usage | Nikias Bassen | 1 | -7/+4 | |
2017-02-07 | plist: Fix assert() to allow 16 or 8 byte integer sizes (16 bytes = unsigned ↵ | Nikias Bassen | 1 | -1/+1 | |
integer) Credit to Wang Junjie <zhunkibatu@gmail.com> (#90) Credit to OSS-Fuzz | |||||
2017-02-05 | bplist: Add error/debug logging (only if configured with --enable-debug) | Nikias Bassen | 1 | -0/+4 | |
This commit adds proper debug/error messages being printed if the binary plist parser encounters anything abnormal. To enable debug logging, libplist must be configured with --enable-debug, and the environment variable PLIST_BIN_DEBUG must be set to "1". | |||||
2016-11-27 | plist_copy: Duplicate hash tables when copying PLIST_DICT nodes | Nikias Bassen | 1 | -5/+15 | |
2016-11-18 | Improve plist_dict_set_item performance for large dictionaries with hash table | Nikias Bassen | 1 | -12/+75 | |
2016-10-22 | Remove libxml2 dependency in favor of custom XML parsing | Nikias Bassen | 1 | -15/+71 | |
2016-09-19 | Change internal storage of PLIST_DATE values from struct timeval to double | Nikias Bassen | 1 | -22/+11 | |
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. | |||||
2016-09-08 | Make sure plist_cleanup() symbol is actually public | Martin Szulecki | 1 | -1/+1 | |
2016-06-29 | xplist: Plug memory leak when converting PLIST_UID nodes to XML | Nikias Bassen | 1 | -1/+1 | |
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. | |||||
2016-06-29 | plist_data_compare: Make sure to compare the node sizes for integer nodes | Nikias Bassen | 1 | -0/+2 | |
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. | |||||
2016-05-12 | Implement plist_from_memory() | Christophe Fergeau | 1 | -0/+15 | |
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. | |||||
2016-05-12 | Add plist_is_binary() | Christophe Fergeau | 1 | -0/+9 | |
It can be useful if one needs to know what type of plist a memory buffer contains. | |||||
2016-04-20 | Move libxml cleanup code to a plist_cleanup method | Frederik Carlier | 1 | -0/+18 | |
2015-01-23 | Update and correct some copyright header comments | Martin Szulecki | 1 | -1/+3 | |
2014-10-03 | Avoid exporting non-public symbols | Nikias Bassen | 1 | -48/+48 | |
2014-05-20 | Removed plist_set_type() as it should not be used. | Nikias Bassen | 1 | -30/+0 | |
2014-05-20 | Rename "index" variable as it shadows global declaration on older systems | Martin Szulecki | 1 | -2/+2 | |
2014-04-02 | Simplify plist_dict_merge() after plist_dict_set_item() API change | Nikias Bassen | 1 | -3/+0 | |
2014-03-19 | deprecated plist_dict_insert_item in favor of plist_dict_set_item | Nikias Bassen | 1 | -6/+1 | |
2014-03-19 | plist_dict_set_item: insert key/value pair if key not already present | Nikias Bassen | 1 | -10/+11 | |
2013-12-13 | add new plist_dict_merge() function | Nikias Bassen | 1 | -0/+27 | |
2012-09-16 | plist_data_compare: for PLIST_DATA, compare length before accessing data | Nicolás Alvarez | 1 | -0/+2 | |
2012-09-16 | implemented handling of UID keyed encoding type | Nikias Bassen | 1 | -0/+27 | |
2012-04-24 | fix plist_dict_set_item() and plist_array_set_item() | Nikias Bassen | 1 | -9/+17 | |
2011-05-27 | Make libplist glib free | Nikias Bassen | 1 | -43/+58 | |
2010-01-21 | Fix some warnings | Jonathan Beck | 1 | -34/+2 | |