mirror of
https://github.com/stascorp/rdpwrap.git
synced 2024-11-09 17:58:20 +00:00
Do not forget about security
This commit is contained in:
parent
e3ce360ec9
commit
e2968a43de
@ -370,6 +370,8 @@ bool INI_FILE::GetVariableInSection(char *SectionName, char *VariableName, INI_V
|
||||
|
||||
DWORD ValueLen = strlen(Variable.VariableValue);
|
||||
if((ValueLen % 2) != 0) return false;
|
||||
// for security reasons not more than 16 bytes
|
||||
if (ValueLen > 32) ValueLen = 32; // 32 hex digits
|
||||
|
||||
memset(RetVariable, 0x00, sizeof(*RetVariable));
|
||||
memcpy(RetVariable->Name, Variable.VariableName, ValueLen);
|
||||
|
Loading…
Reference in New Issue
Block a user