projects
/
coreboot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
cbfstool: Fill memory allocated in create_cbfs_file() with 0xff
[coreboot.git]
/
util
/
cbfstool
/
common.c
diff --git
a/util/cbfstool/common.c
b/util/cbfstool/common.c
index e87bc65bb30346bb09bb39e3ac178debd7d9c6c2..dd675cac03128392af2b4d2adeea824005bfe7ca 100644
(file)
--- a/
util/cbfstool/common.c
+++ b/
util/cbfstool/common.c
@@
-279,6
+279,7
@@
void *create_cbfs_file(const char *filename, void *data, uint32_t * datasize,
headersize);
exit(1);
}
+ memset(newdata, 0xff, *datasize + headersize);
struct cbfs_file *nextfile = (struct cbfs_file *)newdata;
strncpy(nextfile->magic, "LARCHIVE", 8);
nextfile->len = htonl(*datasize);