Mercurial > cpython-lru_cache-weakref
diff Python/dynload_os2.c @ 21077:379fc66f4c96 legacy-trunk
Use PyOS_snprintf instead of sprintf.
| author | Jeremy Hylton <jeremy@alum.mit.edu> |
|---|---|
| date | Wed, 28 Nov 2001 20:42:20 +0000 |
| parents | 225c7dd17e37 |
| children | fd25030223b0 94f64f11fdd0 |
line wrap: on
line diff
--- a/Python/dynload_os2.c Wed Nov 28 20:37:25 2001 +0000 +++ b/Python/dynload_os2.c Wed Nov 28 20:42:20 2001 +0000 @@ -31,14 +31,14 @@ if (rc != NO_ERROR) { char errBuf[256]; - sprintf(errBuf, - "DLL load failed, rc = %d: %.200s", - rc, failreason); + PyOS_snprintf(errBuf, sizeof(errBuf), + "DLL load failed, rc = %d: %.200s", + rc, failreason); PyErr_SetString(PyExc_ImportError, errBuf); return NULL; } - sprintf(funcname, "init%.200s", shortname); + PyOS_snprintf(funcname, sizeof(funcname), "init%.200s", shortname); rc = DosQueryProcAddr(hDLL, 0L, funcname, &p); if (rc != NO_ERROR) p = NULL; /* Signify Failure to Acquire Entrypoint */
