Core/Chat: Add a missing terminator check

(cherry picked from commit bf6082a8354910beef00551b1c17bcdfe9492ab1)
This commit is contained in:
Treeston
2021-10-31 01:39:10 +02:00
committed by Shauren
parent c10ea61491
commit 127c9e5014
+4
View File
@@ -39,8 +39,12 @@ HyperlinkInfo Trinity::Hyperlinks::ParseHyperlink(char const* pos)
return nullptr;
uint32 color = 0;
for (uint8 i = 0; i < 8; ++i)
{
if (uint8 hex = toHex(*(pos++)))
color = (color << 4) | (hex & 0xf);
else
return nullptr;
}
// link data start tag
if (*(pos++) != '|' || *(pos++) != 'H')
return nullptr;