[New-bugs-announce] [issue18184] Add range check for %c in PyUnicode_FromFormat

Serhiy Storchaka report at bugs.python.org
Mon Jun 10 23:00:13 CEST 2013

New submission from Serhiy Storchaka:

Currently PyUnicode_FromFormat doesn't check an argument for %c and can raise SystemError only due maxchar check in PyUnicode_New. On 2.7 an error doesn't raised, but %c argument can be silently wrapped (on narrow build) or illegal Unicode string can be created (on wide build). The proposed patch adds explicit range check for %c argument.

components: Interpreter Core, Unicode
files: format_c.diff
keywords: patch
messages: 190935
nosy: ezio.melotti, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Add range check  for %c in PyUnicode_FromFormat
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file30535/format_c.diff

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list