Skip to content

Commit

Permalink
xml BUGFIX invalid pointer access
Browse files Browse the repository at this point in the history
Fixes #1282
  • Loading branch information
michalvasko committed Jan 27, 2021
1 parent c5ede41 commit 0aa4616
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ lyxml_correct_elem_ns(struct ly_ctx *ctx, struct lyxml_elem *elem, struct lyxml_
}
}
}
if (iter->content[0] && copy_ns) {
if (iter->content && iter->content[0] && copy_ns) {
lyxml_correct_content_ns(ctx, iter, orig);
}
if (correct_attrs) {
Expand Down

0 comments on commit 0aa4616

Please sign in to comment.