Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i686-w64-mingw32-gcc -I. -I../include -I"../../nghttp2/pkg/usr/local/include" -I"../../libssh2/include" -I"../../libssh2/win32" -I"../../openssl/include" -I"../../zlib/pkg/usr/local" -I"../../brotli/pkg/usr/local/include" -DCURL_STATICLIB -fno-ident -DCURL_DISABLE_SSL_AUTO_LOAD_CONFIG -fno-asynchronous-unwind-tables -DNGHTTP2_STATICLIB -g -O2 -Wall -W -fno-strict-aliasing -m32 -DBUILDING_LIBCURL -DCURL_WITH_MULTI_SSL -DUSE_NGHTTP2 -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H -DUSE_OPENSSL -DHAVE_OPENSSL_ENGINE_H -DHAVE_OPENSSL_PKCS12_H -DHAVE_ENGINE_LOAD_BUILTIN_ENGINES -DOPENSSL_NO_KRB5 -DHAVE_OPENSSL_SRP -DUSE_TLS_SRP -DUSE_SCHANNEL -DHAVE_LIBZ -DHAVE_ZLIB_H -DHAVE_BROTLI -DUSE_WIN32_IDN -DWANT_IDN_PROTOTYPES -DUSE_WINDOWS_SSPI -DENABLE_IPV6 -D_WIN32_WINNT=0x0501 -DHAVE_LDAP_SSL -c vtls/openssl.c -o vtls/openssl.o In function 'ossl_keylog_callback.part.2', inlined from 'ossl_keylog_callback': vtls/openssl.c:256:5: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] strncpy(buf, line, linelen); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ vtls/openssl.c: In function 'ossl_keylog_callback': vtls/openssl.c:247:22: note: length computed here size_t linelen = strlen(line); ^~~~~~~~~~~~ In function 'ossl_keylog_callback.part.2', inlined from 'ossl_keylog_callback': vtls/openssl.c:256:5: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] strncpy(buf, line, linelen); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ vtls/openssl.c: In function 'ossl_keylog_callback': vtls/openssl.c:247:22: note: length computed here size_t linelen = strlen(line); ^~~~~~~~~~~~
Can't spot what may be wrong with the code. Swapping strncpy() for memcpy() makes the warning disappear.
strncpy()
memcpy()
The text was updated successfully, but these errors were encountered:
357161a
Nothing is wrong with it but memcpy is fine so let's do that.
Sorry, something went wrong.
openssl: fix gcc8 warning
735130b
Ref: curl#2980
No branches or pull requests
Can't spot what may be wrong with the code. Swapping
strncpy()
formemcpy()
makes the warning disappear.The text was updated successfully, but these errors were encountered: