Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crashes while parsing xml #106

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

kontura
Copy link
Contributor

@kontura kontura commented Sep 27, 2023

For: #103
For: #47

On input such as: `<whatever />` there is no `comps_doc` created ->
create it to make sure we don't crash.
This unifies the behavior with `PyCOMPS_fromxml_f`.

Also adds a unit test.
@jan-kolarik jan-kolarik self-assigned this Oct 2, 2023
On input like:
```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE variants PUBLIC "-//Red Hat, Inc.//DTD Variants info//EN" "variants.dtd">
<variants>
</variants>
```
the document is parsed but there is no `comps_doc` so we cannot work
with it.

Also adds a unit test.
@jan-kolarik jan-kolarik merged commit 51fc778 into rpm-software-management:master Oct 4, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants