rpm-software-management / librepo

A library providing C and Python (libcURL like) API for downloading packages and linux repository metadata in rpm-md format
http://rpm-software-management.github.io/librepo/
GNU Lesser General Public License v2.1
74 stars 91 forks source link

Fix lr_yum_download_url in case lr_handle is NULL #228

Closed m-blaha closed 3 years ago

m-blaha commented 3 years ago

This simple python reproducer made librepo dump core:

>>> import os, librepo, tempfile
>>> t = tempfile.TemporaryFile()
>>> librepo.download_url('file:///etc/passwd', t.fileno())
Segmentation fault (core dumped)
bors[bot] commented 3 years ago

try

Build failed:

lukash commented 3 years ago

bors retry

bors[bot] commented 3 years ago

try

Build failed:

Conan-Kudo commented 3 years ago

@m-blaha Can you rebase this and see if the GitHub Actions CI will be able to run through this?

m-blaha commented 3 years ago

Oh, sure. I completely forgot this PR.