PyUnicode_FindChar() raises a IndexError on invalid index
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index c0511dd..ab77b03 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -8089,6 +8089,10 @@
     int kind;
     if (PyUnicode_READY(str) == -1)
         return -2;
+    if (start < 0 || end < 0) {
+        PyErr_SetString(PyExc_IndexError, "string index out of range");
+        return -2;
+    }
     if (end > PyUnicode_GET_LENGTH(str))
         end = PyUnicode_GET_LENGTH(str);
     kind = PyUnicode_KIND(str);