]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Issue #19437: Use an identifier for "__name__" string in pickle to improve
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 14 Nov 2013 00:26:17 +0000 (01:26 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 14 Nov 2013 00:26:17 +0000 (01:26 +0100)
commit804e05e800163e6982b036b025b6333b17d9b3a0
treeb055212625bb7d1181699e1e4a8a3cdd182c552e
parentc82729e44f2935f72b5cd0e7eb36a87558459663
Issue #19437: Use an identifier for "__name__" string in pickle to improve
error handling

The following code didn't handle correctly the failure of
PyUnicode_InternFromString("__name__").

if (newobj_str == NULL) {
    newobj_str = PyUnicode_InternFromString("__newobj__");
    name_str = PyUnicode_InternFromString("__name__");
    if (newobj_str == NULL || name_str == NULL)
        return -1;
}
Modules/_pickle.c