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
765f062a
Commit
765f062a
authored
8 years ago
by
Nikias Bassen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xplist: Prevent memory leak(s) when parsing fails
Credit to OSS-Fuzz
parent
012e4a8d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
xplist.c
src/xplist.c
+2
-2
No files found.
src/xplist.c
View file @
765f062a
...
@@ -1221,7 +1221,7 @@ static void node_from_xml(parse_ctx ctx, plist_t *plist)
...
@@ -1221,7 +1221,7 @@ static void node_from_xml(parse_ctx ctx, plist_t *plist)
if
(
!
keyname
)
{
if
(
!
keyname
)
{
PLIST_XML_ERR
(
"missing key name while adding dict item
\n
"
);
PLIST_XML_ERR
(
"missing key name while adding dict item
\n
"
);
ctx
->
err
++
;
ctx
->
err
++
;
break
;
goto
err_out
;
}
}
plist_dict_set_item
(
parent
,
keyname
,
subnode
);
plist_dict_set_item
(
parent
,
keyname
,
subnode
);
break
;
break
;
...
@@ -1232,7 +1232,7 @@ static void node_from_xml(parse_ctx ctx, plist_t *plist)
...
@@ -1232,7 +1232,7 @@ static void node_from_xml(parse_ctx ctx, plist_t *plist)
/* should not happen */
/* should not happen */
PLIST_XML_ERR
(
"parent is not a structered node
\n
"
);
PLIST_XML_ERR
(
"parent is not a structered node
\n
"
);
ctx
->
err
++
;
ctx
->
err
++
;
break
;
goto
err_out
;
}
}
}
}
if
(
!
is_empty
&&
(
data
->
type
==
PLIST_DICT
||
data
->
type
==
PLIST_ARRAY
))
{
if
(
!
is_empty
&&
(
data
->
type
==
PLIST_DICT
||
data
->
type
==
PLIST_ARRAY
))
{
...
...
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