diff options
author | Nikias Bassen | 2021-12-23 14:21:06 +0100 |
---|---|---|
committer | Nikias Bassen | 2021-12-23 14:21:06 +0100 |
commit | 914480a8771959bc2dc0f5e8e83365c15c05c36d (patch) | |
tree | 9edd0fb4701273d9ae237dc2e1c159bd122f44c5 | |
parent | 24dcee30c5b74f32c90491f0c083a1c212cfe3a1 (diff) | |
download | libplist-914480a8771959bc2dc0f5e8e83365c15c05c36d.tar.gz libplist-914480a8771959bc2dc0f5e8e83365c15c05c36d.tar.bz2 |
test: Work around JSON parser limitation expecting to have a 0-terminated string as input
-rw-r--r-- | test/plist_cmp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/plist_cmp.c b/test/plist_cmp.c index 85b92ee..2af3f63 100644 --- a/test/plist_cmp.c +++ b/test/plist_cmp.c @@ -124,6 +124,9 @@ int main(int argc, char *argv[]) fclose(iplist1); fclose(iplist2); + plist_1[size_in1] = '\0'; + plist_2[size_in2] = '\0'; + if (memcmp(plist_1, "bplist00", 8) == 0) plist_from_bin(plist_1, size_in1, &root_node1); else if (plist_1[0] == '[' || plist_1[0] == '{') |