mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-21 06:45:21 -06:00
Fix for gcc 8.2 warnings.
Replace strncat with memcpy to placate gcc 8.2. Also fix issue in tempfileplus. Issue #192.
This commit is contained in:
parent
d4819bc3a3
commit
4310da6075
2 changed files with 8 additions and 8 deletions
2
third_party/tmpfileplus/tmpfileplus.c
vendored
2
third_party/tmpfileplus/tmpfileplus.c
vendored
|
|
@ -169,7 +169,7 @@ static char *getenv_save(const char *varname, char *buf, size_t bufsize)
|
|||
buf[0] = '\0';
|
||||
if (ptr)
|
||||
{
|
||||
strncpy(buf, ptr, bufsize);
|
||||
strncpy(buf, ptr, bufsize-1);
|
||||
buf[bufsize-1] = '\0';
|
||||
return buf;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue