mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-27 18:43:48 +00:00
Use strncpy instead of strcpy because again, buffer overflows
This commit is contained in:
parent
7769da9434
commit
79c34c68db
92 changed files with 298 additions and 279 deletions
|
|
@ -668,13 +668,13 @@ void BitStream::readString(char buf[256])
|
|||
{
|
||||
S32 offset = readInt(8);
|
||||
HuffmanProcessor::g_huffProcessor.readHuffBuffer(this, stringBuffer + offset);
|
||||
dStrcpy(buf, stringBuffer);
|
||||
dStrcpy(buf, stringBuffer, 256);
|
||||
return;
|
||||
}
|
||||
}
|
||||
HuffmanProcessor::g_huffProcessor.readHuffBuffer(this, buf);
|
||||
if(stringBuffer)
|
||||
dStrcpy(stringBuffer, buf);
|
||||
dStrcpy(stringBuffer, buf, 256);
|
||||
}
|
||||
|
||||
void BitStream::writeString(const char *string, S32 maxLen)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue