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

Segfault for empty DictStr when converted to string #54

Closed
CodeHeeler opened this issue Oct 2, 2019 · 1 comment
Closed

Segfault for empty DictStr when converted to string #54

CodeHeeler opened this issue Oct 2, 2019 · 1 comment

Comments

@CodeHeeler
Copy link

CodeHeeler commented Oct 2, 2019

Calling str() on empty DictStr object triggers a segfault.

Can reproduce with this code:

import libcomps
import urllib.request

url_empty_strdict = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/repodata/5e655c4cde94fe5f1a39ed2015d5a5bbfa051fa032b3fb911609ada337b5fee8-comps.xml'
url_non_empty_strdict = 'https://dl.fedoraproject.org/pub/epel/7/x86_64/repodata/c629c8fc439517aed1ff09d9c8ba32f2fa6984a2f9683e4cd19726591f68128b-comps-Everything.x86_64.xml'

def test(url):
    file_path = '/tmp/test_comps.xml'
    urllib.request.urlretrieve(url, file_path)
    comps = libcomps.Comps()
    comps.fromxml_f(file_path)
    print(comps.categories[0].desc_by_lang)

test(url_empty_strdict)  # segfault
#test(url_non_empty_strdict) # no segfault

We are using the python bindings, so not sure if it goes beyond that.

Versions in use:

$ sudo dnf list installed | grep libcomps
libcomps.x86_64 0.1.11-1.fc30 @anaconda
libcomps-devel.x86_64 0.1.11-1.fc30 @fedora
python3-libcomps.x86_64 0.1.11-1.fc30 @anaconda

@dralley
Copy link
Contributor

dralley commented Nov 18, 2019

Looks like this should be closed, fixed by #56

@kontura kontura closed this as completed Nov 22, 2019
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

No branches or pull requests

3 participants