Commit 03ab0a9e authored by David Keitel's avatar David Keitel
Browse files

FstatToplist: simplify string ops in write_hs_checkpoint()

 -tmpfilename is constructed explicitly to hold filename and TMP_EXT
 -so strcpy and strcat instead of strncpy and strncat should suffice
 -this should solve complaint by some conda gcc version that
  "specified bound depends on the length of the source argument"
parent 29016513
...@@ -741,8 +741,8 @@ int write_hs_checkpoint(const char*filename, toplist_t*tl, UINT4 counter, BOOLEA ...@@ -741,8 +741,8 @@ int write_hs_checkpoint(const char*filename, toplist_t*tl, UINT4 counter, BOOLEA
LogPrintf(LOG_CRITICAL,"Couldn't allocate tmpfilename\n"); LogPrintf(LOG_CRITICAL,"Couldn't allocate tmpfilename\n");
return(-2); return(-2);
} }
strncpy(tmpfilename,filename,len); strcpy(tmpfilename,filename);
strncat(tmpfilename,TMP_EXT,len); strcat(tmpfilename,TMP_EXT);
/* calculate checksum */ /* calculate checksum */
checksum = 0; checksum = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment