diff Modules/socketmodule.c @ 21094:c2150313d9d1 legacy-trunk

More sprintf -> PyOS_snprintf.
author Tim Peters <tim.peters@gmail.com>
date Wed, 28 Nov 2001 22:07:30 +0000
parents 304b34023876
children 15ff504632ed
line wrap: on
line diff
--- a/Modules/socketmodule.c	Wed Nov 28 21:49:51 2001 +0000
+++ b/Modules/socketmodule.c	Wed Nov 28 22:07:30 2001 +0000
@@ -3089,7 +3089,8 @@
 	    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 */