From 4054ef493ba2531d82f5b30c4a6e6fb9830ee651 Mon Sep 17 00:00:00 2001 From: binarymaster Date: Tue, 9 Dec 2014 16:09:54 +0300 Subject: [PATCH] Update --- src-x86-x64-Fusix/IniFile.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src-x86-x64-Fusix/IniFile.cpp b/src-x86-x64-Fusix/IniFile.cpp index cec7906..94d9c75 100644 --- a/src-x86-x64-Fusix/IniFile.cpp +++ b/src-x86-x64-Fusix/IniFile.cpp @@ -371,6 +371,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); @@ -401,7 +403,7 @@ bool INI_FILE::GetVariableInSection(char *SectionName, char *VariableName, INI_V switch(Variable.VariableValue[i+1]) { - case '0': break; + case '0': break; case '1': RetVariable->Value[(i/2)] += 1; break; case '2': RetVariable->Value[(i/2)] += 2; break; case '3': RetVariable->Value[(i/2)] += 3; break;