Skip to content

Commit 856f87c

Browse files
authored
Merge pull request from GHSA-5x45-qp78-g4p4
* Prevent infinite loop in scanning xml content * Simplify scanning method * Optimization
1 parent 38c13af commit 856f87c

File tree

1 file changed

+2
-0
lines changed
  • pjlib-util/src/pjlib-util

1 file changed

+2
-0
lines changed

Diff for: pjlib-util/src/pjlib-util/xml.c

+2
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ static pj_xml_node *xml_parse_node( pj_pool_t *pool, pj_scanner *scanner)
150150
pj_scan_get_until_ch(scanner, ']', &node->content);
151151
while (pj_scan_strcmp(scanner, "]]>", 3)) {
152152
pj_str_t dummy;
153+
154+
pj_scan_advance_n(scanner, 1, PJ_FALSE);
153155
pj_scan_get_until_ch(scanner, ']', &dummy);
154156
}
155157
node->content.slen = scanner->curptr - node->content.ptr;

0 commit comments

Comments
 (0)