summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2022-01-31 03:32:57 +0100
committerGravatar Nikias Bassen2022-01-31 03:32:57 +0100
commit6fcecd0226ee25e69ce049c4eba10933a0a2e944 (patch)
treef94d32bf3ffa4a125148a4a0f4d7f774716b9699
parente3ed270b6e91222758efc923321edd4ce2cb36cc (diff)
downloadlibplist-6fcecd0226ee25e69ce049c4eba10933a0a2e944.tar.gz
libplist-6fcecd0226ee25e69ce049c4eba10933a0a2e944.tar.bz2
plistutil: Make sure the input buffer is 0-terminated in all code paths
-rw-r--r--tools/plistutil.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/plistutil.c b/tools/plistutil.c
index 28848fa..677e432 100644
--- a/tools/plistutil.c
+++ b/tools/plistutil.c
@@ -246,6 +246,7 @@ int main(int argc, char *argv[])
plist_entire = (char *) malloc(sizeof(char) * (filestats.st_size + 1));
read_size = fread(plist_entire, sizeof(char), filestats.st_size, iplist);
+ plist_entire[read_size] = '\0';
fclose(iplist);
}