Commit 58ab084a authored by Barry Warsaw's avatar Barry Warsaw

PyWin_FindRegisteredModule(): Conversion of sprintf() to

PyOS_snprintf() for buffer overrun avoidance.
parent d586756d
......@@ -49,9 +49,9 @@ FILE *PyWin_FindRegisteredModule(const char *moduleName,
* also no heap fragmentation!
*/
moduleKey = alloca(bufSize);
sprintf(moduleKey,
"Software\\Python\\PythonCore\\%s\\Modules\\%s%s",
PyWin_DLLVersionString, moduleName, debugString);
PyOS_snprintf(moduleKey, bufSize,
"Software\\Python\\PythonCore\\%s\\Modules\\%s%s",
PyWin_DLLVersionString, moduleName, debugString);
modNameSize = pathLen;
regStat = RegQueryValue(keyBase, moduleKey, pathBuf, &modNameSize);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment