mirror of
https://github.com/python/cpython.git
synced 2024-11-26 11:24:40 +08: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 New Issue
Block a user