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
1cdb8885
Commit
1cdb8885
authored
8 years ago
by
Nikias Bassen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xplist: Error out when invalid tags inside text nodes are encountered
parent
7a3ce8da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
xplist.c
src/xplist.c
+12
-2
No files found.
src/xplist.c
View file @
1cdb8885
...
...
@@ -587,15 +587,25 @@ static text_part_t* get_text_parts(parse_ctx ctx, const char* tag, size_t tag_le
}
ctx
->
pos
+=
3
;
}
else
{
PLIST_XML_ERR
(
"Invalid special tag <[%.6s encountered
\n
"
,
ctx
->
pos
);
p
=
ctx
->
pos
;
find_next
(
ctx
,
"
\r\n\t
>"
,
5
,
1
);
PLIST_XML_ERR
(
"Invalid special tag '<[%.*s>' encountered inside '<%s>' tag
\n
"
,
(
int
)(
ctx
->
pos
-
p
),
p
,
tag
);
ctx
->
err
++
;
return
NULL
;
}
}
else
{
p
=
ctx
->
pos
;
find_next
(
ctx
,
"
\r\n\t
>"
,
5
,
1
);
PLIST_XML_ERR
(
"Invalid special tag '<!%.*s>' encountered inside '<%s>' tag
\n
"
,
(
int
)(
ctx
->
pos
-
p
),
p
,
tag
);
ctx
->
err
++
;
return
NULL
;
}
}
else
if
(
*
ctx
->
pos
==
'/'
)
{
break
;
}
else
{
PLIST_XML_ERR
(
"Invalid tag %.10s inside %s tag
\n
"
,
ctx
->
pos
,
tag
);
p
=
ctx
->
pos
;
find_next
(
ctx
,
"
\r\n\t
>"
,
5
,
1
);
PLIST_XML_ERR
(
"Invalid tag '<%.*s>' encountered inside '<%s>' tag
\n
"
,
(
int
)(
ctx
->
pos
-
p
),
p
,
tag
);
ctx
->
err
++
;
return
NULL
;
}
...
...
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