Commit aed19842 authored by Serhiy Storchaka's avatar Serhiy Storchaka

Issue #23055: Fixed read-past-the-end error in PyUnicode_FromFormatV.

parent 3f95292b
...@@ -762,6 +762,8 @@ PyUnicode_FromFormatV(const char *format, va_list vargs) ...@@ -762,6 +762,8 @@ PyUnicode_FromFormatV(const char *format, va_list vargs)
f++; f++;
while (*f && *f != '%' && !Py_ISALPHA((unsigned)*f)) while (*f && *f != '%' && !Py_ISALPHA((unsigned)*f))
f++; f++;
if (!*f)
break;
if (*f == 's' || *f=='S' || *f=='R' || *f=='A' || *f=='V') if (*f == 's' || *f=='S' || *f=='R' || *f=='A' || *f=='V')
++callcount; ++callcount;
} }
......
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