mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 23:31:40 +02:00
BUG/MINOR: spoa-server: fix size_t format printing
From https://www.python.org/dev/peps/pep-0353/ "A new type Py_ssize_t is introduced, which has the same size as the compiler's size_t type, but is signed. It will be a typedef for ssize_t where available." For integer types, causes printf to expect a size_t-sized integer argument. This should fix github issue #702 This should be backported to >= v2.2 Signed-off-by: William Dauchy <w.dauchy@criteo.com>
This commit is contained in:
parent
87138c3524
commit
bbe18ac5df
@ -66,7 +66,7 @@ static int ps_python_check_overflow(Py_ssize_t len)
|
|||||||
*/
|
*/
|
||||||
if (len >= (Py_ssize_t)INT_MAX) {
|
if (len >= (Py_ssize_t)INT_MAX) {
|
||||||
PyErr_Format(spoa_error,
|
PyErr_Format(spoa_error,
|
||||||
"%d is over 2GB. Please split in smaller pieces.", \
|
"%zd is over 2GB. Please split in smaller pieces.", \
|
||||||
len);
|
len);
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user