diff options
| author | 2026-02-10 17:45:12 +0100 | |
|---|---|---|
| committer | 2026-02-10 17:45:12 +0100 | |
| commit | 8c78d89041b713bffcb0b09fee4468304a3a54d5 (patch) | |
| tree | 2c9427e2382b47c2aaf724a074fadafde415c066 /src/plist.h | |
| parent | 9ef0d05265198ede1fd14271ab3f4812d34ebe2e (diff) | |
| download | libplist-8c78d89041b713bffcb0b09fee4468304a3a54d5.tar.gz libplist-8c78d89041b713bffcb0b09fee4468304a3a54d5.tar.bz2 | |
Convert plist_free_node() and plist_copy_node() to iterative
implementations. This avoids unbounded recursion and stack
overflow when handling deeply nested plist data, while
preserving existing semantics and caches.
Diffstat (limited to 'src/plist.h')
| -rw-r--r-- | src/plist.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plist.h b/src/plist.h index e310bcc..7228696 100644 --- a/src/plist.h +++ b/src/plist.h @@ -49,9 +49,15 @@ #endif #endif +#include "node.h" + #ifndef PLIST_MAX_NESTING_DEPTH +#ifdef NODE_MAX_DEPTH +#define PLIST_MAX_NESTING_DEPTH NODE_MAX_DEPTH +#else #define PLIST_MAX_NESTING_DEPTH 512 #endif +#endif #include "plist/plist.h" |
