Commit a54169b3 authored by Stefan Reinauer's avatar Stefan Reinauer Committed by Stefan Tauner
Browse files

CID1130011: Use after free in ich_descriptor_tool


Corresponding to flashrom svn r1771.
Signed-off-by: default avatarStefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
parent f94d9cea
......@@ -77,12 +77,13 @@ static void dump_file(const char *prefix, const uint32_t *dump, unsigned int len
printf("Dumping %u bytes of the %s region from 0x%08x-0x%08x to %s... ",
file_len, region_names[i], base, limit, fn);
int fh = open(fn, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
free(fn);
if (fh < 0) {
fprintf(stderr,
"ERROR: couldn't open(%s): %s\n", fn, strerror(errno));
free(fn);
exit(1);
}
free(fn);
ret = write(fh, &dump[base >> 2], file_len);
if (ret != file_len) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment