diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-01-30 23:15:29 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-01-30 23:15:29 (GMT) |
commit | 227526dc5c47151d3829823f39ba122e7a348ed1 (patch) | |
tree | 85da9eb90f072539782de571ad1036d0265af111 /Objects | |
parent | 5ec0bbf27dfef0d486dca1177d8c86f37969474e (diff) | |
download | cpython-227526dc5c47151d3829823f39ba122e7a348ed1.zip cpython-227526dc5c47151d3829823f39ba122e7a348ed1.tar.gz cpython-227526dc5c47151d3829823f39ba122e7a348ed1.tar.bz2 |
Issue #23055: Fixed read-past-the-end error in PyUnicode_FromFormatV.
Diffstat (limited to 'Objects')
-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 1e3b812..91e7524 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; } |