Commit 0d250d11 authored by Serhiy Storchaka's avatar Serhiy Storchaka

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

parent 426d548e
...@@ -738,6 +738,8 @@ PyUnicode_FromFormatV(const char *format, va_list vargs) ...@@ -738,6 +738,8 @@ PyUnicode_FromFormatV(const char *format, va_list vargs)
f++; f++;
while (*f && *f != '%' && !isalpha((unsigned)*f)) while (*f && *f != '%' && !isalpha((unsigned)*f))
f++; f++;
if (!*f)
break;
if (*f == 's' || *f=='S' || *f=='R') if (*f == 's' || *f=='S' || *f=='R')
++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