| Age | Commit message (Collapse) | Author | Files | Lines |
|
This change adds stricter validation for numeric and date nodes,
including full-input consumption, overflow/range checks, and rejection
of invalid floating-point values. Whitespace handling is clarified by
explicitly trimming trailing XML whitespace for value nodes.
|
|
This removes the necessity for malloc failures and reduces overhead
|
|
Use explicit key/value stepping, zero-initialize hash lookup key,
and perform length-checked comparisons on NUL-terminated key strings.
|
|
Credit to @ylwango613
|
|
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
Fixes issue #300
Credit to @jasonmli8
|
|
|
|
- Fix numeric character reference parsing
- Enforce exact entity name matching
- Guard against size_t underflow and oversized entities
- Reject invalid Unicode code points
|
|
Fixes #285
Credit to @ylwango613 for reporting.
|
|
- Treat input as unsigned bytes
- Correct UTF-8 bit decoding for 2/3/4-byte sequences
- Add overlong, surrogate, and range checks
- Enforce lead/continuation byte constraints
This addresses issue #283.
Credit to @hgarrereyn for reporting.
|
|
|
|
Use size_t for token start/end offsets instead of int, replace the -1
sentinel with SIZE_MAX, and add a defensive guard against offset
wraparound. This prevents overflow when parsing very large JSON inputs.
This addresses issue #282.
Credit to @ylwango613 for repporting.
|
|
Credit to @LkkkLxy. Addresses #277.
|
|
Credit to @LkkkLxy for reporting (#276).
libplist nodes are owned by exactly one container. Inserting the same
plist_t into multiple dicts or arrays corrupts the tree structure and
leads to use-after-free crashes during traversal or plist_free().
Add explicit parent checks to dict and array insertion APIs to reject
nodes that already belong to another container. In debug builds, this
fails loudly via assert() and optional diagnostics; in release builds,
the operation safely no-ops.
Callers that need to reuse values must create a copy using plist_copy()
or explicitly detach the node before reinserting it.
|
|
|
|
Thanks to @unbengable12 for reporting. Addresses #288, #289, #290, #291, and #292.
|
|
|
|
Thanks to @LkkkLxy for pointing out the issue.
|
|
member
|
|
Ensure plist_data_compare safely handles NULL inputs by normalizing
NULL data to empty values and avoiding invalid dereferences.
|
|
Credit to OSS-Fuzz
|
|
|
|
Even though this is weird, the DTD allows it. This commit will also make
the XML output write `<key/>` and `<string/>` instead of `<key></key>` and `<string></string>`
in case of empty key/string node.
|
|
Thanks to @ylwango613 for reporting
|
|
Thanks to @ylwango613 for pointing this out!
|
|
Given the fact that timegm64 is only invoked with a valid pointer,
this should never trigger.
|
|
|
|
Updated the Integer(const PList::Integer&) constructor to free the existing plist node and copy the node from the input object, ensuring correct initialization.
|
|
|
|
plist_date_val_compare calls plist_get_date_val which is now marked
deprecated. To avoid compiler warnings during build, we use the underlying
implementation directly instead of calling the function to work around it.
|
|
functions
These functions work with int64_t values representing a UNIX timestamp instead
of using the 'MAC epoch'. They should be used instead of plist_new_date,
plist_get_date_val, and plist_set_date_val, which are now marked deprecated
and might be removed in a future version of libplist.
|
|
Otherwise the internal assertion will trigger since the incorrect
size will be checked against.
Thanks to @michaelwright235, @guyingzhao, and others for pointing this out!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Credit to @Anza2001
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This prevents a bug class where we bswap things when __LITTLE_ENDIAN__ is not defined.
Almost all modern systems are little endian, so detecting __BIG_ENDIAN__ is a better strategy.
|
|
|