mirror of
https://github.com/VirusTotal/yara.git
synced 2026-10-12 02:10:00 +00:00
Fix warning.
This commit is contained in:
+3
-4
@@ -89,10 +89,9 @@ SIZED_STRING* sized_string_new(
|
||||
result->length = length;
|
||||
result->flags = 0;
|
||||
|
||||
strncpy(result->c_string, s, length);
|
||||
|
||||
result->c_string[length] = '\0';
|
||||
|
||||
// Copy the string and the null terminator.
|
||||
strcpy(result->c_string, s);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user