##// END OF EJS Templates
pathencode: check result of .digest() method in sha1hash...
Augie Fackler -
r26050:822f46b8 default
parent child Browse files
Show More
@@ -684,6 +684,8 b' static int sha1hash(char hash[20], const'
684
684
685 hashobj = PyObject_CallMethod(shaobj, "digest", "");
685 hashobj = PyObject_CallMethod(shaobj, "digest", "");
686 Py_DECREF(shaobj);
686 Py_DECREF(shaobj);
687 if (hashobj == NULL)
688 return -1;
687
689
688 if (!PyString_Check(hashobj) || PyString_GET_SIZE(hashobj) != 20) {
690 if (!PyString_Check(hashobj) || PyString_GET_SIZE(hashobj) != 20) {
689 PyErr_SetString(PyExc_TypeError,
691 PyErr_SetString(PyExc_TypeError,
General Comments 0
You need to be logged in to leave comments. Login now