New submission from STINNER Victor <victor.stin...@haypocalc.com>:

Guido created the "convenience function" PyErr_Format() 13 years ago (r7580) 
with a naive implementation using char buffer[500] and vsprintf(). He added a 
comment:

/* Caller is responsible for limiting the format */

Ok, that was true 13 years ago. But today Python uses dynamically allocated 
buffers, and so we can simply replace %.100s ("%\.[0-9]+s" regex) by %s.

Anyway, PyUnicode_FromFormatV() doesn't support precision for %s and %U formats 
:-)

----------
components: Interpreter Core
messages: 125399
nosy: amaury.forgeotdarc, haypo
priority: normal
severity: normal
status: open
title: Replace %.100s by %s in PyErr_Format(): the arbitrary limit of 500 bytes 
is outdated
versions: Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10833>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to