[Libguestfs] [Bug 1406906] [PATCH 0/3] Fix segmentation fault in Python bindings

Pino Toscano ptoscano at redhat.com
Tue May 9 13:24:16 UTC 2017


On Saturday, 6 May 2017 11:32:26 CEST Matteo Cafasso wrote:
> This series addresses the issue where non UTF8 file names in a guest
> image lead to libguestfs segfault with Python 3 APIs.

All the patches are basically parts of the same fix, so I'd squash them
together in a single patch that changes the generator, the manual
parts, and add a test to prove the fix works.

> The core issue is the APIs are not checking the return value when
> constructing a new PyObject. Therefore NULL pointers are added to
> Python collections (lists and dictionaries) crashing the application.

All these #ifdef HAVE_PYSTRING_ASSTRING blocks make both the OCaml, and
the generated C code hard to read -- I've just send a cleanup patch for
this: https://www.redhat.com/archives/libguestfs/2017-May/msg00051.html

Aside this, and the notes left for patch #3, the changes would look
correct to me.

Thanks,
-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20170509/accccd6c/attachment.sig>


More information about the Libguestfs mailing list