mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Fix some invalid heap ops found by Dr Memory
This commit is contained in:
@ -366,8 +366,8 @@ char* hsStrcpy(char dst[], const char src[])
|
||||
{
|
||||
if (dst == nil)
|
||||
{
|
||||
int count = strlen(src);
|
||||
dst = (char *)malloc(count + 1);
|
||||
size_t count = strlen(src);
|
||||
dst = new char[count + 1];
|
||||
memcpy(dst, src, count);
|
||||
dst[count] = 0;
|
||||
return dst;
|
||||
|
Reference in New Issue
Block a user