diff options
author | Yann Collet <cyan@fb.com> | 2020-11-15 00:24:36 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2020-11-15 00:27:57 (GMT) |
commit | e0f85f2fc8e8868b2623a5344781f269bda7d4ba (patch) | |
tree | 362c2dda28e611c7110c80a4c2ad3d67ae466407 /programs | |
parent | 468011c346a1e73eede3e70ee8009f812b02cc76 (diff) | |
download | lz4-e0f85f2fc8e8868b2623a5344781f269bda7d4ba.zip lz4-e0f85f2fc8e8868b2623a5344781f269bda7d4ba.tar.gz lz4-e0f85f2fc8e8868b2623a5344781f269bda7d4ba.tar.bz2 |
better visual conformance
only include <intrin.h> on vs2005+ (#947)
remove some useless #pragma
fix a few minor Visual warnings
Diffstat (limited to 'programs')
-rw-r--r-- | programs/util.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/programs/util.h b/programs/util.h index 2f3d0a8..733c1ca 100644 --- a/programs/util.h +++ b/programs/util.h @@ -594,15 +594,15 @@ UTIL_createFileList(const char** inputNames, unsigned inputNamesNb, for (i=0, pos=0, nbFiles=0; i<inputNamesNb; i++) { if (!UTIL_isDirectory(inputNames[i])) { - size_t const len = strlen(inputNames[i]); + size_t const len = strlen(inputNames[i]) + 1; /* include nul char */ if (pos + len >= bufSize) { while (pos + len >= bufSize) bufSize += LIST_SIZE_INCREASE; buf = (char*)UTIL_realloc(buf, bufSize); if (!buf) return NULL; } assert(pos + len < bufSize); - strncpy(buf + pos, inputNames[i], bufSize - pos); - pos += len + 1; + memcpy(buf + pos, inputNames[i], len); + pos += len; nbFiles++; } else { char* bufend = buf + bufSize; |