Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2024-05-13 | Revert "Change API around #PLIST_DATA to use uint8_t instead of char arrays" | Nikias Bassen | 1 | -5/+5 | |
This reverts commit a91f5740d100414a76959714b819422ee5b2d8a8. | |||||
2024-04-18 | Add PLIST_DICT convenience functions for different queries/operations | Nikias Bassen | 1 | -0/+245 | |
2024-04-14 | Change API around #PLIST_DATA to use uint8_t instead of char arrays | Nikias Bassen | 1 | -5/+6 | |
This makes it more obvious that it is arbitrary data and not necessarily a string value. | |||||
2024-02-05 | Add a libplist_version() function to the interface | Nikias Bassen | 1 | -0/+8 | |
2023-12-12 | Prevent OOB access in plist_from_memory | Nikias Bassen | 1 | -2/+14 | |
Credit to OSS-Fuzz | |||||
2023-08-30 | Prevent adding NULL items to array/dictionary nodes | Nikias Bassen | 1 | -0/+12 | |
Thanks to @tihmstar for pointing this out! | |||||
2023-06-15 | Plug memory leak in plist_write_to_stream() | Nikias Bassen | 1 | -0/+1 | |
Thanks @beyonik for pointing this out! | |||||
2023-05-21 | Add explicit casts and fix return type mismatches | Nikias Bassen | 1 | -43/+47 | |
2023-05-20 | Add an explicit PLIST_FORMAT_NONE value | Nikias Bassen | 1 | -2/+2 | |
2023-05-13 | Move PLIST_API to the headers | Nikias Bassen | 1 | -83/+83 | |
2023-05-05 | Silence compiler warning on 32bit systems | Nikias Bassen | 1 | -1/+1 | |
2023-04-19 | Remove deprecated plist_dict_insert_item() | Nikias Bassen | 1 | -5/+0 | |
2023-04-19 | Add plist_read_from_file() to interface, update plist_from_memory() | Nikias Bassen | 1 | -1/+51 | |
plist_read_from_file() is a convenience function that will open a given file, checks its size, allocates a buffer large enough to hold the full contents, and reads from file to fill the buffer. Then, it calls plist_from_memory() to convert the data to plist format. A (breaking) change had to be made so that plist_from_memory() will also return the parsed format in its 4th argument (if non-NULL). | |||||
2023-04-16 | Add new output-only formats and Define constants for the different plist formats | Nikias Bassen | 1 | -0/+92 | |
This commit introduces constants for the different plist formats, and adds 3 new human-readable output-only formats: - PLIST_FORMAT_PRINT: the default human-readable format - PLIST_FORMAT_LIMD: "libimobiledevice" format (used in ideviceinfo) - PLIST_FORMAT_PLUTIL: plutil-style format Also, a new set of write functions has been added: - plist_write_to_string - plist_write_to_stream - plist_write_to_file Plus a simple "dump" function: - plist_print See documentation for details. | |||||
2023-02-07 | Add function to interface to allow enabling/disabling error/debug output for ↵ | Nikias Bassen | 1 | -0/+13 | |
the format parses This makes the `-d` option work in plistutil that wasn't doing anything | |||||
2023-02-06 | libcnary: Updated typedefs of node_t and node_list_t to contain pointer | Nikias Bassen | 1 | -41/+41 | |
This makes the code more readable. Obviously all the code that uses it is also updated. | |||||
2023-02-05 | Fix plist_sort() by swapping the nodes in the tree instead of their data | Nikias Bassen | 1 | -29/+33 | |
The problem was that we swapped potential child node data between nodes, but their parents would not be updated that way, leading to double frees or segmentation faults when freeing a plist. This commit instead fixes this by swapping the actual nodes in the tree. | |||||
2023-02-03 | Add new plist_sort() function | Nikias Bassen | 1 | -0/+61 | |
2023-01-31 | bplist: Fix handling of PLIST_NULL node type | Nikias Bassen | 1 | -0/+1 | |
2023-01-16 | Rename PLIST_UINT to PLIST_INT and add plist_new_int() and plist_get_int_val() | Nikias Bassen | 1 | -8/+60 | |
This properly supports getting and setting signed or unsigned integer values. Also, a new helper function plist_int_val_is_negative() was added to determine if a given #PLIST_INT node has a negative value or not. The old type PLIST_UINT is defined as a macro with the value of PLIST_INT for backwards compatibility. This commit also adds int vs. uint support to the C++ interface, and the python bindings in a hopefully useful way. | |||||
2023-01-08 | Add support for OpenStep plist format | Nikias Bassen | 1 | -5/+49 | |
2022-09-05 | Fix up warning with `-Wbad-function-cast` | Dave MacLachlan | 1 | -1/+4 | |
2022-04-06 | Skip whitespace to properly detect format in plist_from_memory() | Nikias Bassen | 1 | -3/+8 | |
2021-12-23 | Add support for JSON format | Nikias Bassen | 1 | -0/+6 | |
2021-12-22 | Add a return value to plist_to_* and plist_from_* functions | Nikias Bassen | 1 | -7/+11 | |
This way it can be easier determined why an import/export operation failed instead of just having a NULL result. | |||||
2021-12-19 | Add support for PLIST_NULL type | Nikias Bassen | 1 | -0/+9 | |
2021-12-19 | Add new plist_mem_free() function | Nikias Bassen | 1 | -0/+8 | |
Thanks to @azerg for bringing this to my attention. Instead of having multiple (internally identical) plist_*_free() functions, this commit introduces a single plist_mem_free() that can be used to free the memory allocated by plist_to_xml(), plist_to_bin(), plist_get_key_val(), plist_get_string_val(), and plist_get_data_val(). Note: This commit REMOVES plist_to_bin_free() and plist_to_xml_free(). | |||||
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. |