diff options
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index eccee4d..db91d8b 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -3089,7 +3089,8 @@ OS2init(void) return 1; /* Indicate Success */ } - sprintf(reason, "OS/2 TCP/IP Error# %d", sock_errno()); + PyOS_snprintf(reason, sizeof(reason), + "OS/2 TCP/IP Error# %d", sock_errno()); PyErr_SetString(PyExc_ImportError, reason); return 0; /* Indicate Failure */ |