Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libplist
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwn
libplist
Commits
fbd8494d
Commit
fbd8494d
authored
8 years ago
by
Nikias Bassen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bplist: Make sure to bail out if malloc() fails in parse_string_node()
Credit to Wang Junjie <zhunkibatu@gmail.com> (#93)
parent
3a5520cc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
bplist.c
src/bplist.c
+5
-0
No files found.
src/bplist.c
View file @
fbd8494d
...
...
@@ -289,6 +289,11 @@ static plist_t parse_string_node(const char **bnode, uint64_t size)
data
->
type
=
PLIST_STRING
;
data
->
strval
=
(
char
*
)
malloc
(
sizeof
(
char
)
*
(
size
+
1
));
if
(
!
data
->
strval
)
{
plist_free_data
(
data
);
PLIST_BIN_ERR
(
"%s: Could not allocate %"
PRIu64
" bytes
\n
"
,
__func__
,
sizeof
(
char
)
*
(
size
+
1
));
return
NULL
;
}
memcpy
(
data
->
strval
,
*
bnode
,
size
);
data
->
strval
[
size
]
=
'\0'
;
data
->
length
=
strlen
(
data
->
strval
);
...
...
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