diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-01-30 23:15:48 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-01-30 23:15:48 (GMT) |
commit | aed198426a3b1186633295cd4a6160ab4423e069 (patch) | |
tree | acc6dd19ff79228c5df5e4ae258b90e63afe40c7 | |
parent | 3f95292be69ac09ed173e4241d220d30b1b059ff (diff) | |
download | cpython-aed198426a3b1186633295cd4a6160ab4423e069.zip cpython-aed198426a3b1186633295cd4a6160ab4423e069.tar.gz cpython-aed198426a3b1186633295cd4a6160ab4423e069.tar.bz2 |
Issue #23055: Fixed read-past-the-end error in PyUnicode_FromFormatV.
-rw-r--r-- | Objects/unicodeobject.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 1d1d531..090cc1f 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -762,6 +762,8 @@ PyUnicode_FromFormatV(const char *format, va_list vargs) f++; while (*f && *f != '%' && !Py_ISALPHA((unsigned)*f)) f++; + if (!*f) + break; if (*f == 's' || *f=='S' || *f=='R' || *f=='A' || *f=='V') ++callcount; } |