This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author noxdafox
Recipients noxdafox
Date 2016-12-21.19:52:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1482349932.8.0.094002567537.issue29039@psf.upfronthosting.co.za>
In-reply-to
Content
The following code snippet:

----------------------------------------------
#include <stdio.h>
#include <Python.h>

int main()
{
    char *broken_string[8];
    char broken_char = 4294967252;

    sprintf(broken_string, "%c", broken_char);

    PyUnicode_FromString(broken_string);
}
----------------------------------------------

Produces a Segmentation Fault.

Is this behaviour the expected one? 

The real life example comes when reading a malformed path on a Ext4 filesystem. The read string causes PyUnicode_FromString to segfault.
History
Date User Action Args
2016-12-21 19:52:12noxdafoxsetrecipients: + noxdafox
2016-12-21 19:52:12noxdafoxsetmessageid: <1482349932.8.0.094002567537.issue29039@psf.upfronthosting.co.za>
2016-12-21 19:52:12noxdafoxlinkissue29039 messages
2016-12-21 19:52:12noxdafoxcreate