Ticket #25391: crypt_debug.patch

File crypt_debug.patch, 636 bytes (added by jdemeyer, 17 months ago)
  • Modules/_cryptmodule.c

    diff -ru Python-3.6.1//Modules/_cryptmodule.c b/Modules/_cryptmodule.c
    old new  
    3636{
    3737    /* On some platforms (AtheOS) crypt returns NULL for an invalid
    3838       salt. Return None in that case. XXX Maybe raise an exception?  */
    39     return Py_BuildValue("s", crypt(word, salt));
     39    fprintf(stderr, "crypt('%s', '%s')", word, salt); fflush(stderr);
     40    char *res = crypt(word, salt);
     41    fprintf(stderr, " = '%s'\n", res); fflush(stderr);
     42    return Py_BuildValue("s", res);
    4043}
    4144
    4245