Issue #15732: Fix (constructed) crash in _PySequence_BytesToCharpArray().
Found by Coverity.
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 2f887aa..299daf5 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2736,6 +2736,11 @@
     for (i = 0; i < argc; ++i) {
         char *data;
         item = PySequence_GetItem(self, i);
+        if (item == NULL) {
+            /* NULL terminate before freeing. */
+            array[i] = NULL;
+            goto fail;
+        }
         data = PyBytes_AsString(item);
         if (data == NULL) {
             /* NULL terminate before freeing. */