Python strings ending with '\0' should not be equivalent to their C counterparts in PyUnicode_CompareWithASCIIString
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 9c0be9b..40377ea 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -7001,6 +7001,11 @@
for (i = 0; id[i] && str[i]; i++)
if (id[i] != str[i])
return ((int)id[i] < (int)str[i]) ? -1 : 1;
+ /* This check keeps Python strings that end in '\0' from comparing equal
+ to C strings identical up to that point. */
+ if (PyUnicode_GET_SIZE(uni) != i)
+ /* We'll say the Python string is longer. */
+ return 1;
if (id[i])
return 1; /* uni is longer */
if (str[i])