<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libplist/src, branch 2.8.0</title>
<subtitle>Library to handle Apple Property List format files in binary or XML</subtitle>
<link rel='alternate' type='text/html' href='https://cgit.libimobiledevice.org/libplist.git/'/>
<entry>
<title>plist: fix inverted strcmp in string to boolean conversion</title>
<updated>2026-09-29T14:43:02+00:00</updated>
<author>
<name>Arpit Jain</name>
</author>
<published>2026-07-29T05:25:18+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.libimobiledevice.org/libplist.git/commit/?id=bd68e726e45c10fd223814eaf6129e1bb2f7b022'/>
<id>bd68e726e45c10fd223814eaf6129e1bb2f7b022</id>
<content type='text'>
plist_dict_get_bool() compared the string value with strcmp() but treated a
non-zero return as a match. strcmp() returns 0 on equality, so the conditions
were inverted: "true" produced 0, "false" produced 1, and any other string
also produced 1. The error branch could never be reached, since it required
both comparisons to return 0 at once.

The result is that the API returns the opposite of the stored value for both
valid boolean strings, and returns true for strings that are not booleans at
all, instead of reporting the conversion error.

Compare == 0 in both conditions:

  input          before   after
  true           0        1
  false          1        0
  not-a-bool     1        error
  TRUE           1        error
  (empty)        1        error

Signed-off-by: Arpit Jain &lt;arpitjain099@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
plist_dict_get_bool() compared the string value with strcmp() but treated a
non-zero return as a match. strcmp() returns 0 on equality, so the conditions
were inverted: "true" produced 0, "false" produced 1, and any other string
also produced 1. The error branch could never be reached, since it required
both comparisons to return 0 at once.

The result is that the API returns the opposite of the stored value for both
valid boolean strings, and returns true for strings that are not booleans at
all, instead of reporting the conversion error.

Compare == 0 in both conditions:

  input          before   after
  true           0        1
  false          1        0
  not-a-bool     1        error
  TRUE           1        error
  (empty)        1        error

Signed-off-by: Arpit Jain &lt;arpitjain099@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bytearray: Handle realloc() failure in byte_array_grow()</title>
<updated>2026-09-29T14:39:28+00:00</updated>
<author>
<name>Comtea04</name>
</author>
<published>2026-09-27T06:06:22+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.libimobiledevice.org/libplist.git/commit/?id=f168c10b52325b00da6355989a18a11743b33f89'/>
<id>f168c10b52325b00da6355989a18a11743b33f89</id>
<content type='text'>
byte_array_grow() assigned the result of realloc() directly to
ba-&gt;data and increased the capacity even if realloc() failed, so the
following memcpy() in byte_array_append() wrote to NULL + len.

On failure, free the old buffer and leave the byte array in a failed
state (data == NULL), which byte_array_append() already ignores. The
callers check for that state:

- the writers (bin, xml, json, openstep and the text output formats)
  return PLIST_ERR_NO_MEM instead of handing out a NULL/truncated buffer
- node_to_xml() base64-encodes &lt;data&gt; directly into the grown buffer,
  so it must bail out there (only guarded by assert() before)
- the OpenStep parser returns PLIST_ERR_NO_MEM for &lt;hex data&gt; instead of
  silently returning truncated data

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
byte_array_grow() assigned the result of realloc() directly to
ba-&gt;data and increased the capacity even if realloc() failed, so the
following memcpy() in byte_array_append() wrote to NULL + len.

On failure, free the old buffer and leave the byte array in a failed
state (data == NULL), which byte_array_append() already ignores. The
callers check for that state:

- the writers (bin, xml, json, openstep and the text output formats)
  return PLIST_ERR_NO_MEM instead of handing out a NULL/truncated buffer
- node_to_xml() base64-encodes &lt;data&gt; directly into the grown buffer,
  so it must bail out there (only guarded by assert() before)
- the OpenStep parser returns PLIST_ERR_NO_MEM for &lt;hex data&gt; instead of
  silently returning truncated data

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ptrarray: Handle realloc() failure in ptr_array_insert()</title>
<updated>2026-09-27T06:06:22+00:00</updated>
<author>
<name>Comtea04</name>
</author>
<published>2026-09-27T06:06:22+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.libimobiledevice.org/libplist.git/commit/?id=8b48fa72d359de89215f50cbf6ac8c77ae5de9b4'/>
<id>8b48fa72d359de89215f50cbf6ac8c77ae5de9b4</id>
<content type='text'>
ptr_array_insert() assigned the result of realloc() directly to
pa-&gt;pdata and bumped the capacity without checking for failure, so on
out-of-memory the old buffer was leaked and the following store or
memmove() wrote through a NULL pointer.

Keep the old buffer on failure and return -1 from ptr_array_insert()
and ptr_array_add(). The callers now handle the error:

- the array lookup cache (plist.c) is dropped instead of silently going
  out of sync with the node list; lookups then fall back to walking
  the children, as they do before the cache exists
- bplist parsing (used_indexes) and serialization (objects) return
  PLIST_ERR_NO_MEM; ignoring the error in parse_bin_node_at_index()
  would otherwise loop forever since the array never grows

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ptr_array_insert() assigned the result of realloc() directly to
pa-&gt;pdata and bumped the capacity without checking for failure, so on
out-of-memory the old buffer was leaked and the following store or
memmove() wrote through a NULL pointer.

Keep the old buffer on failure and return -1 from ptr_array_insert()
and ptr_array_add(). The callers now handle the error:

- the array lookup cache (plist.c) is dropped instead of silently going
  out of sync with the node list; lookups then fall back to walking
  the children, as they do before the cache exists
- bplist parsing (used_indexes) and serialization (objects) return
  PLIST_ERR_NO_MEM; ignoring the error in parse_bin_node_at_index()
  would otherwise loop forever since the array never grows

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Print debug error message when encoutering invalid PLIST_DATE values</title>
<updated>2026-05-22T18:41:23+00:00</updated>
<author>
<name>Nikias Bassen</name>
</author>
<published>2026-05-22T18:41:23+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.libimobiledevice.org/libplist.git/commit/?id=bd851a87ec93db2516455e982f121389a86fc0f7'/>
<id>bd851a87ec93db2516455e982f121389a86fc0f7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bplist: Use format macro to use correct format in error message</title>
<updated>2026-05-22T17:23:23+00:00</updated>
<author>
<name>Nikias Bassen</name>
</author>
<published>2026-05-22T17:23:23+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.libimobiledevice.org/libplist.git/commit/?id=024864926b1de278d6877a0864c1ca36f35c20e6'/>
<id>024864926b1de278d6877a0864c1ca36f35c20e6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>common: validate PLIST_DATE values before Time64_T conversion</title>
<updated>2026-05-22T17:20:51+00:00</updated>
<author>
<name>Nikias Bassen</name>
</author>
<published>2026-05-22T17:20:51+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.libimobiledevice.org/libplist.git/commit/?id=ba82092e43d4769dbc6f0557d58a243f93542486'/>
<id>ba82092e43d4769dbc6f0557d58a243f93542486</id>
<content type='text'>
Avoid undefined behavior when serializing malformed PLIST_DATE values
containing NaN, infinity, or values outside the Time64_T range. Add a
shared helper for checked date conversion and use it across writer paths.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid undefined behavior when serializing malformed PLIST_DATE values
containing NaN, infinity, or values outside the Time64_T range. Add a
shared helper for checked date conversion and use it across writer paths.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: centralize formatting helpers and harden out-plutil</title>
<updated>2026-05-22T16:46:02+00:00</updated>
<author>
<name>Nikias Bassen</name>
</author>
<published>2026-05-22T16:46:02+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.libimobiledevice.org/libplist.git/commit/?id=9711459dbed7d60bb00c7d2c052623e8489c88e1'/>
<id>9711459dbed7d60bb00c7d2c052623e8489c88e1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>out-default: harden node serialization paths</title>
<updated>2026-05-22T14:37:57+00:00</updated>
<author>
<name>Nikias Bassen</name>
</author>
<published>2026-05-22T14:37:57+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.libimobiledevice.org/libplist.git/commit/?id=389fab9a07baf3913c4214425e86cca588d559a1'/>
<id>389fab9a07baf3913c4214425e86cca588d559a1</id>
<content type='text'>
Improve robustness and memory safety in node_to_string() and dtostr():

- add missing NULL and allocation checks
- fix snprintf() error handling and signed/unsigned conversions
- replace sprintf() with snprintf()
- fix base64 buffer sizing
- switch string offset tracking to size_t
- improve malformed data handling for strings and data blobs
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Improve robustness and memory safety in node_to_string() and dtostr():

- add missing NULL and allocation checks
- fix snprintf() error handling and signed/unsigned conversions
- replace sprintf() with snprintf()
- fix base64 buffer sizing
- switch string offset tracking to size_t
- improve malformed data handling for strings and data blobs
</pre>
</div>
</content>
</entry>
<entry>
<title>out-limd: Properly handle snprintf and some smaller improvements</title>
<updated>2026-05-22T13:46:37+00:00</updated>
<author>
<name>Nikias Bassen</name>
</author>
<published>2026-05-22T13:46:37+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.libimobiledevice.org/libplist.git/commit/?id=5546a8746558d088d90ba8f6cb52a50f886c9572'/>
<id>5546a8746558d088d90ba8f6cb52a50f886c9572</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>out-limd: Fix memory buffer allocation size (#313)</title>
<updated>2026-05-22T13:00:16+00:00</updated>
<author>
<name>Nikias Bassen</name>
</author>
<published>2026-05-22T13:00:16+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.libimobiledevice.org/libplist.git/commit/?id=9d4f14a0ba93dc39d516b5e1c1cd107693b81629'/>
<id>9d4f14a0ba93dc39d516b5e1c1cd107693b81629</id>
<content type='text'>
Credit to @Bri1987
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Credit to @Bri1987
</pre>
</div>
</content>
</entry>
</feed>
