Commit 6a043f3f authored by Barry Warsaw's avatar Barry Warsaw

PyUnicode_Contains(): The memcmp() call didn't take into account the

width of Py_UNICODE.  Good catch, MAL.
parent 496e6581
......@@ -3765,7 +3765,7 @@ int PyUnicode_Contains(PyObject *container,
else {
end = lhs + (PyUnicode_GET_SIZE(u) - size);
while (lhs <= end) {
if (memcmp(lhs++, rhs, size) == 0) {
if (memcmp(lhs++, rhs, size * sizeof(Py_UNICODE)) == 0) {
result = 1;
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment