strop_replace(): balk if the pattern string is empty.
diff --git a/Modules/stropmodule.c b/Modules/stropmodule.c
index e9e9039..73c2d85 100644
--- a/Modules/stropmodule.c
+++ b/Modules/stropmodule.c
@@ -1091,6 +1091,10 @@
 			      &str, &len, &pat, &pat_len, &sub, &sub_len,
 			      &count))
 		return NULL;
+	if (pat_len <= 0) {
+		PyErr_SetString(PyExc_ValueError, "empty pattern string");
+		return NULL;
+	}
 	new_s = mymemreplace(str,len,pat,pat_len,sub,sub_len,count,&out_len);
 	if (new_s == NULL) {
 		PyErr_NoMemory();