Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
e45820dc
Unverified
Commit
e45820dc
authored
Jan 30, 2018
by
davidcunado-arm
Committed by
GitHub
Jan 30, 2018
Browse files
Merge pull request #1242 from afaerber/fiptool-hikey-pad
fiptool: Fix use after free
parents
e282b9d9
8e4cdd22
Changes
1
Show whitespace changes
Inline
Side-by-side
tools/fiptool/fiptool.c
View file @
e45820dc
...
...
@@ -543,7 +543,6 @@ static int pack_images(const char *filename, uint64_t toc_flags, unsigned long a
log_dbgx
(
"Metadata size: %zu bytes"
,
buf_size
);
xfwrite
(
buf
,
buf_size
,
fp
,
filename
);
free
(
buf
);
if
(
verbose
)
log_dbgx
(
"Payload size: %zu bytes"
,
payload_size
);
...
...
@@ -566,6 +565,7 @@ static int pack_images(const char *filename, uint64_t toc_flags, unsigned long a
while
(
pad_size
--
)
fputc
(
0x0
,
fp
);
free
(
buf
);
fclose
(
fp
);
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment