mirror of https://github.com/x64dbg/TitanEngine
char white list
This commit is contained in:
parent
a5ed9b685f
commit
55ace2599b
|
|
@ -255,11 +255,27 @@ static void AddLogMessageW(const wchar_t* szLogMessage, eLogType Type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool IsValidChar(char s)
|
||||||
|
{
|
||||||
|
if (isalnum(s))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (s == '$' || s == '-' || s == '>')
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void AddLogMessage(const char* szLogMessage, eLogType Type)
|
static void AddLogMessage(const char* szLogMessage, eLogType Type)
|
||||||
{
|
{
|
||||||
if (strlen(szLogMessage) > 0)
|
if (strlen(szLogMessage) > 0)
|
||||||
{
|
{
|
||||||
if (isalnum(szLogMessage[0]))
|
if (IsValidChar(szLogMessage[0]))
|
||||||
{
|
{
|
||||||
TCHAR * buf = (TCHAR *)calloc(strlen(szLogMessage) + 1, sizeof(TCHAR));
|
TCHAR * buf = (TCHAR *)calloc(strlen(szLogMessage) + 1, sizeof(TCHAR));
|
||||||
if (buf)
|
if (buf)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue