Mercurial > cpython-lru_cache-weakref
diff Python/getargs.c @ 86358:63bc2fe28a6e
Re #18521: move array bounds check before array access.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Mon, 14 Oct 2013 07:01:11 +0200 |
| parents | aeebbae8c74c |
| children | fafe20297927 |
line wrap: on
line diff
--- a/Python/getargs.c Mon Oct 14 06:51:46 2013 +0200 +++ b/Python/getargs.c Mon Oct 14 07:01:11 2013 +0200 @@ -376,7 +376,7 @@ "argument %" PY_FORMAT_SIZE_T "d", iarg); i = 0; p += strlen(p); - while (levels[i] > 0 && i < 32 && (int)(p-buf) < 220) { + while (i < 32 && levels[i] > 0 && (int)(p-buf) < 220) { PyOS_snprintf(p, sizeof(buf) - (p - buf), ", item %d", levels[i]-1); p += strlen(p);
