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
e4dc36f1
Commit
e4dc36f1
authored
8 years ago
by
Nikias Bassen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xplist: Prevent OOB read in two more cases
parent
ca33a2b7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
xplist.c
src/xplist.c
+10
-0
No files found.
src/xplist.c
View file @
e4dc36f1
...
@@ -546,6 +546,11 @@ static text_part_t* get_text_parts(parse_ctx ctx, const char* tag, size_t tag_le
...
@@ -546,6 +546,11 @@ static text_part_t* get_text_parts(parse_ctx ctx, const char* tag, size_t tag_le
}
}
if
(
*
ctx
->
pos
==
'!'
)
{
if
(
*
ctx
->
pos
==
'!'
)
{
ctx
->
pos
++
;
ctx
->
pos
++
;
if
(
ctx
->
pos
>=
ctx
->
end
-
1
)
{
PLIST_XML_ERR
(
"EOF while parsing <! special tag
\n
"
);
ctx
->
err
++
;
return
NULL
;
}
if
(
*
ctx
->
pos
==
'-'
&&
*
(
ctx
->
pos
+
1
)
==
'-'
)
{
if
(
*
ctx
->
pos
==
'-'
&&
*
(
ctx
->
pos
+
1
)
==
'-'
)
{
if
(
last
)
{
if
(
last
)
{
last
=
text_part_append
(
last
,
p
,
q
-
p
,
0
);
last
=
text_part_append
(
last
,
p
,
q
-
p
,
0
);
...
@@ -844,6 +849,11 @@ static void node_from_xml(parse_ctx ctx, plist_t *plist, uint32_t depth)
...
@@ -844,6 +849,11 @@ static void node_from_xml(parse_ctx ctx, plist_t *plist, uint32_t depth)
ctx
->
pos
+=
8
;
ctx
->
pos
+=
8
;
while
(
ctx
->
pos
<
ctx
->
end
)
{
while
(
ctx
->
pos
<
ctx
->
end
)
{
find_next
(
ctx
,
"
\t\r\n
[>"
,
6
,
1
);
find_next
(
ctx
,
"
\t\r\n
[>"
,
6
,
1
);
if
(
ctx
->
pos
>=
ctx
->
end
)
{
PLIST_XML_ERR
(
"EOF while parsing !DOCTYPE
\n
"
);
ctx
->
err
++
;
goto
err_out
;
}
if
(
*
ctx
->
pos
==
'['
)
{
if
(
*
ctx
->
pos
==
'['
)
{
embedded_dtd
=
1
;
embedded_dtd
=
1
;
break
;
break
;
...
...
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