Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
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 | 3 | -1/+3 | |
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-05-12 | bplist: Speed up plist_to_bin conversion for large plists | Nikias Bassen | 3 | -9/+12 | |
Using a better hashing algorithm and a larger hash table the conversion is A LOT faster when processing large plists. Thanks to Xiao Deng for reporting this issue and suggesting a fix. | |||||
2016-04-20 | Move libxml cleanup code to a plist_cleanup method | Frederik Carlier | 2 | -17/+18 | |
2015-12-07 | Node.cpp: let plist_t operations free _node when in a container. | Aaron Burghardt | 1 | -1/+6 | |
Fixes libimobiledevice/libplist#50. | |||||
2015-11-13 | xplist: Get rid of setlocale() and use custom function to print floating ↵ | Nikias Bassen | 1 | -14/+32 | |
point values | |||||
2015-02-05 | bplist: Refactor binary plist parsing in a recursive way | Nikias Bassen | 1 | -209/+167 | |
2015-01-31 | bplist: Plug memory leaks caused by unused (and unfreed) buffer | Nikias Bassen | 1 | -5/+0 | |
When parsing binary plists with BPLIST_DICT or BPLIST_ARRAY nodes that are referenced multiple times in a particular file, a buffer was allocated that was not used, and also not freed, thus causing memory leaks. | |||||
2015-01-31 | bplist: Fix possible crash in plist_from_bin() caused by access to already ↵ | Nikias Bassen | 1 | -3/+5 | |
freed memory Given a specifically ordered binary plist the function plist_from_bin() would free BPLIST_DICT or BPLIST_ARRAY raw node data that is still required for parsing of following nodes. This commit addresses this issues by moving the memory free to the end of the parsing process. | |||||
2015-01-29 | Move pkg-config file into src directory | Martin Szulecki | 3 | -0/+25 | |
2015-01-23 | xplist: Plug memory leak by cleaning up libxml2's parser after use | Martin Szulecki | 1 | -0/+16 | |
This is actually considered bad practice. However, it appears this memory leak is otherwise not possible to fix due to a design flaw in how libxml2 handles the lifecycle of it's XML parser. We'll let the community test this in production now and decide. In our tests this change had no drawbacks except fixing the last known memory leak in libplist. | |||||
2015-01-23 | Update and correct some copyright header comments | Martin Szulecki | 2 | -2/+6 | |
2015-01-23 | xplist: Fix limited but possible XXE security vulnerability with XML plists | Martin Szulecki | 1 | -4/+16 | |
By using a specifically crafted XML file an attacker could use plistutil to issue a GET request to an arbitrary URL or disclose a local file. The crafted XML file would be using a custom DTD with an external entity reference pointing to the file. Practical abuse is limited but let's still fix it nevertheless. Related to CVE-2013-0339 for libxml2 and CWE-827. Reported by Loïc Bénis from calypt.com. Thanks! | |||||
2015-01-11 | Pass flag '-avoid-version' to libtool for libplist++ in addition to libplist ↵ | Aaron Burghardt | 1 | -0/+1 | |
for WIN32. | |||||
2014-10-09 | bplist: Fix plist_from_bin() changing value nodes to key nodes in dictionaries | Martin Szulecki | 1 | -11/+33 | |
The parsing logic for binary dictionaries wrongly enforced the key type even on nodes that were already parsed as value nodes. This caused the resulting plist_t node tree to have key nodes instead of value nodes within dictionaries for some valid binary plists. This commit should also generally fixes parsing of binary plist files which use an efficient dictionary reference table. | |||||
2014-10-03 | Drop src/common.h and use byte order macros from config.h directly | Nikias Bassen | 3 | -33/+15 | |
2014-10-03 | Avoid exporting non-public symbols | Nikias Bassen | 9 | -82/+82 | |
2014-09-23 | bplist: Prevent crash in plist_from_bin() when parsing unusually structured ↵ | Nikias Bassen | 1 | -1/+1 | |
binary plist | |||||
2014-09-20 | C++: Make sure String::GetValue() and Key::GetValue() don't crash with NULL ↵ | Nikias Bassen | 2 | -4/+14 | |
strings | |||||
2014-09-20 | Added const to Array.GetSize(), and to 3 Node methods. | Aaron Burghardt | 2 | -5/+5 | |
2014-09-20 | Change Clone() to be const, which required constructors with const ↵ | Aaron Burghardt | 11 | -32/+37 | |
references and a const GetValue(). | |||||
2014-08-25 | Fixed memory leaks in new_xml_plist() and parse_real_node(). | Aaron Burghardt | 2 | -3/+1 | |
2014-08-06 | bplist: Silence compiler warning about 'always true' comparison due to type ↵ | Nikias Bassen | 1 | -2/+6 | |
mismatch | |||||
2014-05-27 | xplist: Fix keys not being output correctly if converted to XML entities | Martin Szulecki | 1 | -5/+11 | |
2014-05-23 | Handle signed vs. unsigned integer values correctly | Nikias Bassen | 2 | -5/+53 | |
2014-05-22 | xplist: Handle DST-affected timezones correctly | Nikias Bassen | 1 | -1/+1 | |
2014-05-22 | xplist: Fix PLIST_DATE handling to respect the Mac epoch | Nikias Bassen | 1 | -2/+4 | |
2014-05-21 | xplist: Fix PLIST_DATE parsing in xml_to_node() | Nikias Bassen | 1 | -1/+1 | |
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 | 3 | -7/+7 | |
2014-05-18 | xplist: Silence compiler warnings about shadowing global declarations | Nikias Bassen | 1 | -8/+8 | |
2014-05-18 | bplist: Fix memory leaking caused by unused nodes in plist_from_bin() | Nikias Bassen | 1 | -0/+9 | |
2014-04-02 | Simplify plist_dict_merge() after plist_dict_set_item() API change | Nikias Bassen | 1 | -3/+0 | |
2014-04-01 | xplist: Fix timezone-bound date/time conversion | Nikias Bassen | 1 | -1/+4 | |
2014-03-29 | Fix endian detection in configure.ac | Chow Loong Jin | 1 | -0/+4 | |
On debian-mips, neither __LITTLE_ENDIAN__ nor __BIG_ENDIAN__ are defined anywhere, so PLIST_BYTE_ORDER defaults to PLIST_LITTLE_ENDIAN when it should really be PLIST_BIG_ENDIAN on this architecture. This fixes issue #13. | |||||
2014-03-28 | build-sys: Fix parallel build | Christophe Fergeau | 1 | -1/+1 | |
On my machine, parallel builds fail with: make[2]: Entering directory `/home/teuf/hack/libplist/src' CCLD libplist.la make[2]: *** No rule to make target `../src/libplist.la', needed by `libplist++.la'. Stop. If $(top_builddir)/src/libplist.la does not exist yet when trying to link libplist++.la, automake/make will not realize the $(top_builddir)/src/libplist.la dependency is the same as the libplist.la target, and will thus be unable to generate $(top_builddir)/src/libplist.la. Using the libplist.la instead fixes this issue. I've checked that srcdir!=builddir and make distcheck still pass after this change. | |||||
2014-03-19 | deprecated plist_dict_insert_item in favor of plist_dict_set_item | Nikias Bassen | 2 | -8/+8 | |
2014-03-19 | plist_dict_set_item: insert key/value pair if key not already present | Nikias Bassen | 1 | -10/+11 | |
2014-02-13 | Replace some LDADD references to use $(top_builddir) for distcheck | Martin Szulecki | 1 | -1/+1 | |
2014-02-13 | fix make distcheck | Nikias Bassen | 1 | -3/+3 | |
2014-02-06 | bplist: prevent segmentation fault in plist_from_bin() | Nikias Bassen | 1 | -0/+3 | |
2013-12-13 | bplist: make plist_utf8_to_utf16 static since it is only used internally | Nikias Bassen | 1 | -1/+1 | |
2013-12-13 | xplist: fix another compiler warning with cast | Nikias Bassen | 1 | -1/+1 | |
2013-12-13 | bytearray: silence compiler warning about pointer arithmetic with cast | Nikias Bassen | 1 | -1/+1 | |
2013-12-13 | base64: silence compiler warning by using correct type | Nikias Bassen | 1 | -1/+2 | |
2013-12-13 | xplist: silence compiler warning | Nikias Bassen | 1 | -1/+1 | |
2013-12-13 | xplist: fix shadowed variable declaration | Nikias Bassen | 1 | -3/+3 | |