Skip to content

Commit

Permalink
escape strings before applying FuzzyString
Browse files Browse the repository at this point in the history
  • Loading branch information
H-M-H committed Sep 3, 2016
1 parent f3f6338 commit 1a31158
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/game/server/score/sql_score.cpp
Expand Up @@ -262,6 +262,7 @@ void CSqlScore::MapVote(int ClientID, const char* MapName)
Tmp->m_ClientID = ClientID;
Tmp->m_RequestedMap = MapName;
str_copy(Tmp->m_aFuzzyMap, MapName, sizeof(Tmp->m_aFuzzyMap));
sqlstr::ClearString(Tmp->m_aFuzzyMap, sizeof(Tmp->m_aFuzzyMap));
sqlstr::FuzzyString(Tmp->m_aFuzzyMap);

void *VoteThread = thread_init(ExecSqlFunc, new CSqlExecData(MapVoteThread, Tmp));
Expand Down Expand Up @@ -357,6 +358,7 @@ void CSqlScore::MapInfo(int ClientID, const char* MapName)
Tmp->m_ClientID = ClientID;
Tmp->m_RequestedMap = MapName;
str_copy(Tmp->m_aFuzzyMap, MapName, sizeof(Tmp->m_aFuzzyMap));
sqlstr::ClearString(Tmp->m_aFuzzyMap, sizeof(Tmp->m_aFuzzyMap));
sqlstr::FuzzyString(Tmp->m_aFuzzyMap);

void *InfoThread = thread_init(ExecSqlFunc, new CSqlExecData(MapInfoThread, Tmp));
Expand Down

0 comments on commit 1a31158

Please sign in to comment.