You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, I'm not sure if this error is in go-plist or in libplist.
The error is: plist: error parsing binary property list: illegal integer size
Here is my minimal reproducing testing code:
package main
import "fmt"
import "os"
import "howett.net/plist"
func main() {
dat, _ := os.ReadFile("t4.plist")
var x [][]byte
typ, err := plist.Unmarshal(dat, &x)
fmt.Println(x, typ, err)
}
Output: [] 0 plist: error parsing binary property list: illegal integer size
Here is gzipped input file reproducing the problem: t4.plist.gz
It's just a plist consisting of an array element as its top-level structure, with just a single member which is a data object with length of 65523 bytes or more (its contents does not matter).
Here's the same plist in XML form, generated with plistutil from https://github.com/libimobiledevice/libplist version 2.2.0: t4.xml.gz
And here's a binary plist with the same data & structure but generated using go-plist: t5.plist.gz
Even if the actual bug is in libplist, there are still some binary plists in the wild which were generated with it. And libplist handles both t4.plist and t5.plist without a question, but go-plist fails with t4.plist.
The text was updated successfully, but these errors were encountered:
MarSoft
added a commit
to MarSoft/go-plist
that referenced
this issue
Apr 26, 2023
FixesDHowett#77.
Notice that this is only a partial fix which works for the value of 3 and for any value < 8, but won't help in other cases.
Supporting values < 16 should also be possible, but I didn't bother with it.
Also this doesn't touch `bplist_generator` and hence won't make use of non-standard values for generating plists (while those values could probably give a benefit of slightly reduced plist size).
This is only a partial fix which works for the value of 3 and for any
value < 8, but won't help in other cases. Supporting values < 16 should
also be possible, but I didn't bother with it. Also this doesn't touch
`bplist_generator` and hence won't make use of non-standard values for
generating plists (while those values could probably give a benefit of
slightly reduced plist size).
We confirmed that this is supported by the CoreFoundation bplist parser.
Closes#77
First of all, I'm not sure if this error is in
go-plist
or inlibplist
.The error is:
plist: error parsing binary property list: illegal integer size
Here is my minimal reproducing testing code:
Output:
[] 0 plist: error parsing binary property list: illegal integer size
Here is gzipped input file reproducing the problem: t4.plist.gz
It's just a
plist
consisting of anarray
element as its top-level structure, with just a single member which is adata
object with length of 65523 bytes or more (its contents does not matter).Here's the same plist in XML form, generated with
plistutil
from https://github.com/libimobiledevice/libplist version2.2.0
: t4.xml.gzAnd here's a binary plist with the same data & structure but generated using
go-plist
:t5.plist.gz
Even if the actual bug is in
libplist
, there are still some binary plists in the wild which were generated with it. Andlibplist
handles botht4.plist
andt5.plist
without a question, butgo-plist
fails witht4.plist
.The text was updated successfully, but these errors were encountered: