From 642d96a6476199840502a1e98d4902f7f4d47e78 Mon Sep 17 00:00:00 2001 From: Sean Reifscheider Date: Sat, 1 Aug 2009 23:55:06 +0000 Subject: [PATCH] - Issue #6624: yArg_ParseTuple with "s" format when parsing argument with NUL: Bogus TypeError detail string. --- Misc/NEWS | 3 +++ Python/getargs.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Misc/NEWS b/Misc/NEWS index a60f3b23e1..7e2c653fc4 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -1483,6 +1483,9 @@ Build C-API ----- +- Issue #6624: yArg_ParseTuple with "s" format when parsing argument with + NUL: Bogus TypeError detail string. + - Issue #5175: PyLong_AsUnsignedLongLong now raises OverflowError for negative arguments. Previously, it raised TypeError. diff --git a/Python/getargs.c b/Python/getargs.c index a5dc3602b2..486cf7d07d 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -387,7 +387,7 @@ vgetargs1(PyObject *args, const char *format, va_list *p_va, int flags) flags, levels, msgbuf, sizeof(msgbuf), &freelist); if (msg) { - seterror(i+1, msg, levels, fname, message); + seterror(i+1, msg, levels, fname, msg); return cleanreturn(0, freelist); } } -- 2.50.1