trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Peach <jpe...@apache.org>
Subject Re: git commit: TS-1475: Coverity 1242015 Buffer not null terminated
Date Tue, 30 Sep 2014 15:28:53 GMT

On Sep 30, 2014, at 7:28 AM, zwoop@apache.org wrote:

> Repository: trafficserver
> Updated Branches:
>  refs/heads/master 98ea180cc -> f16c7615a
> 
> 
> TS-1475: Coverity 1242015 Buffer not null terminated
> 
> 
> Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
> Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/f16c7615
> Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/f16c7615
> Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/f16c7615
> 
> Branch: refs/heads/master
> Commit: f16c7615a4f9a824f011e759789331f04b945551
> Parents: 98ea180
> Author: Leif Hedstrom <zwoop@apache.org>
> Authored: Tue Sep 30 08:28:50 2014 -0600
> Committer: Leif Hedstrom <zwoop@apache.org>
> Committed: Tue Sep 30 08:28:50 2014 -0600
> 
> ----------------------------------------------------------------------
> iocore/net/SSLUtils.cc | 2 +-
> lib/ts/ink_string.cc   | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
> ----------------------------------------------------------------------
> 
> 
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f16c7615/iocore/net/SSLUtils.cc
> ----------------------------------------------------------------------
> diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc
> index a807e2b..c399be7 100644
> --- a/iocore/net/SSLUtils.cc
> +++ b/iocore/net/SSLUtils.cc
> @@ -197,7 +197,7 @@ ssl_servername_callback(SSL * ssl, int * ad, void * /*arg*/)
>     netvc->getSSLHandShakeComplete());
> 
>   if (servername != NULL) {
> -    strncpy(netvc->sniServername, servername, TS_MAX_HOST_NAME_LEN);
> +    ink_strlcpy(netvc->sniServername, servername, TS_MAX_HOST_NAME_LEN);
>   }

Can you remove SSLNetVConnection::sniServername? It's not used anywhere, so it just makes
SSLNetVConnections larger ...


Mime
View raw message