Skip to content

Commit 6fcecd0

Browse files
committed
plistutil: Make sure the input buffer is 0-terminated in all code paths
1 parent e3ed270 commit 6fcecd0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tools/plistutil.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ int main(int argc, char *argv[])
246246

247247
plist_entire = (char *) malloc(sizeof(char) * (filestats.st_size + 1));
248248
read_size = fread(plist_entire, sizeof(char), filestats.st_size, iplist);
249+
plist_entire[read_size] = '\0';
249250
fclose(iplist);
250251
}
251252

0 commit comments

Comments
 (0)