mirror of
https://github.com/python/cpython
synced 2024-09-16 04:39:56 +00:00
PyWin_FindRegisteredModule(): Conversion of sprintf() to
PyOS_snprintf() for buffer overrun avoidance.
This commit is contained in:
parent
d586756dc5
commit
58ab084ac6
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue