libimobiledevice / libplist

A library to handle Apple Property List format in binary or XML
https://libimobiledevice.org
GNU Lesser General Public License v2.1
528 stars 304 forks source link

ERROR: Input file is too small to contain valid plist data. #238

Closed Samuel-Martineau closed 7 months ago

Samuel-Martineau commented 7 months ago

plistutil seems to presume that there is a minimum possible length of 7 characters for an input to be valid.

echo '{}' | plistutil -f xml -d # ERROR: Input file is too small to contain valid plist data.
echo '{}     ' | plistutil -f xml -d # Works

This contrasts with Apple's plutil, which works without the extra padding.

echo '{}' | plutil  -convert xml1 -r -o - -- - # Works

As plistutil is often suggested as an open-source alternative to plutil, I think that this different behaviour should be considered a bug.

Samuel-Martineau commented 7 months ago

Nevermind, this was fixed by 60d291941fadb72b66d11502710add5899e21a2d. I seem to have been running an older version.