rpm-software-management/libcomps

Segfault on invalid input file

lubomir opened this issue · 1 comments

$ cat dummy.xml 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE variants PUBLIC "-//Red Hat, Inc.//DTD Variants info//EN" "variants.dtd">
<variants>
</variants>
$ cat crash.py 
import libcomps

comps = libcomps.Comps()
comps.fromxml_f("dummy.xml")
$ python crash.py 
Segmentation fault (core dumped [obraz paměti uložen])

Happens both with python 2 and 3.

  • python3-libcomps-0.1.8-11.fc28.x86_64
  • python2-libcomps-0.1.8-11.fc28.x86_64

This should be fixed by #106