Skip to content

Commit

Permalink
Merge pull request from GHSA-5x45-qp78-g4p4
Browse files Browse the repository at this point in the history
* Prevent infinite loop in scanning xml content

* Simplify scanning method

* Optimization
  • Loading branch information
trengginas committed Mar 29, 2022
1 parent 38c13af commit 856f87c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pjlib-util/src/pjlib-util/xml.c
Expand Up @@ -150,6 +150,8 @@ static pj_xml_node *xml_parse_node( pj_pool_t *pool, pj_scanner *scanner)
pj_scan_get_until_ch(scanner, ']', &node->content);
while (pj_scan_strcmp(scanner, "]]>", 3)) {
pj_str_t dummy;

pj_scan_advance_n(scanner, 1, PJ_FALSE);
pj_scan_get_until_ch(scanner, ']', &dummy);
}
node->content.slen = scanner->curptr - node->content.ptr;
Expand Down

0 comments on commit 856f87c

Please sign in to comment.