From: Serhiy Storchaka Date: Fri, 30 Jan 2015 23:15:29 +0000 (+0200) Subject: Issue #23055: Fixed read-past-the-end error in PyUnicode_FromFormatV. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=227526dc5c47151d3829823f39ba122e7a348ed1;p=python Issue #23055: Fixed read-past-the-end error in PyUnicode_FromFormatV. --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 1e3b812528..91e75244bf 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -738,6 +738,8 @@ PyUnicode_FromFormatV(const char *format, va_list vargs) f++; while (*f && *f != '%' && !isalpha((unsigned)*f)) f++; + if (!*f) + break; if (*f == 's' || *f=='S' || *f=='R') ++callcount; }