Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
048fe191
Commit
048fe191
authored
3 years ago
by
Olivier Deprez
Committed by
TrustedFirmware Code Review
3 years ago
Browse files
Options
Download
Plain Diff
Merge "fix(fdt): fix OOB write in uuid parsing function" into integration
parents
d31f3194
d0d64245
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/uuid.c
+2
-1
common/uuid.c
with
2 additions
and
1 deletion
+2
-1
common/uuid.c
View file @
048fe191
...
...
@@ -73,6 +73,7 @@ static int read_hex(uint8_t *dest, char *hex_src, unsigned int hex_src_len)
int
read_uuid
(
uint8_t
*
dest
,
char
*
uuid
)
{
int
err
;
uint8_t
*
dest_start
=
dest
;
/* Check that we have enough characters */
if
(
strnlen
(
uuid
,
UUID_STRING_LENGTH
)
!=
UUID_STRING_LENGTH
)
{
...
...
@@ -124,7 +125,7 @@ int read_uuid(uint8_t *dest, char *uuid)
if
(
err
<
0
)
{
WARN
(
"Error parsing UUID
\n
"
);
/* Clear the buffer on error */
memset
((
void
*
)
dest
,
'\0'
,
UUID_BYTES_LENGTH
*
sizeof
(
uint8_t
));
memset
((
void
*
)
dest
_start
,
'\0'
,
UUID_BYTES_LENGTH
*
sizeof
(
uint8_t
));
return
-
EINVAL
;
}
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help