You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2018/10/12 10:55:54 UTC
svn commit: r1843644 - /tomcat/native/trunk/native/src/sslcontext.c
Author: rjung
Date: Fri Oct 12 10:55:54 2018
New Revision: 1843644
URL: http://svn.apache.org/viewvc?rev=1843644&view=rev
Log:
Silence compiler warining.
Modified:
tomcat/native/trunk/native/src/sslcontext.c
Modified: tomcat/native/trunk/native/src/sslcontext.c
URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/sslcontext.c?rev=1843644&r1=1843643&r2=1843644&view=diff
==============================================================================
--- tomcat/native/trunk/native/src/sslcontext.c (original)
+++ tomcat/native/trunk/native/src/sslcontext.c Fri Oct 12 10:55:54 2018
@@ -1013,7 +1013,7 @@ TCN_IMPLEMENT_CALL(jboolean, SSLContext,
if (J2S(password)) {
if (!c->cb_data)
c->cb_data = &tcn_password_callback;
- strncpy(c->cb_data->password, J2S(password), SSL_MAX_PASSWORD_LEN);
+ strncpy(c->cb_data->password, J2S(password), SSL_MAX_PASSWORD_LEN - 1);
c->cb_data->password[SSL_MAX_PASSWORD_LEN-1] = '\0';
}
key_file = J2S(key);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org