coverity#982145 Buffer not null terminated

Change-Id: I5dd0050a0fbb5918da2d863998a7f24d9b144780
This commit is contained in:
Julien Nabet
2013-02-23 22:52:48 +01:00
parent 613221bde1
commit bdace7b2aa

View File

@@ -720,7 +720,7 @@ NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname)
}
else // from network, on windows, fname is c:\abc123
{
strncpy(localPathNew, fname, sizeof(localPathNew));
strncpy(localPathNew, fname, NPP_PATH_MAX - 1);
char* pRandomFilename = NULL;
#ifdef UNIX