Potentially fixed strncpy warning by Coverity.
parent
5f30d4c0f8
commit
81bc7825d1
|
@ -795,11 +795,12 @@ public:
|
||||||
Write<uint16_t>(out, compressed);
|
Write<uint16_t>(out, compressed);
|
||||||
// == 20 bytes
|
// == 20 bytes
|
||||||
|
|
||||||
char buff[256];
|
char buff[256] = {0};
|
||||||
strncpy(buff, pFile, 256);
|
ai_snprintf(buff, 256, "%s", pFile);
|
||||||
out->Write(buff, sizeof(char), 256);
|
out->Write(buff, sizeof(char), 256);
|
||||||
|
|
||||||
strncpy(buff, cmd, 128);
|
memset(buff, 0, sizeof(buff));
|
||||||
|
ai_snprintf(buff, 128, "%s", cmd);
|
||||||
out->Write(buff, sizeof(char), 128);
|
out->Write(buff, sizeof(char), 128);
|
||||||
|
|
||||||
// leave 64 bytes free for future extensions
|
// leave 64 bytes free for future extensions
|
||||||
|
|
Loading…
Reference in New Issue