You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2019/01/29 03:13:52 UTC

[trafficserver] branch quic-latest updated: Fix buffer-over-flow

This is an automated email from the ASF dual-hosted git repository.

masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/quic-latest by this push:
     new f8e1e14  Fix buffer-over-flow
f8e1e14 is described below

commit f8e1e14101044b0e4c2c8f2d24c68bb20549a8f5
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Tue Jan 29 12:13:36 2019 +0900

    Fix buffer-over-flow
---
 proxy/http3/Http3SessionAccept.cc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/proxy/http3/Http3SessionAccept.cc b/proxy/http3/Http3SessionAccept.cc
index 0fd8181..c542abc 100644
--- a/proxy/http3/Http3SessionAccept.cc
+++ b/proxy/http3/Http3SessionAccept.cc
@@ -62,11 +62,15 @@ Http3SessionAccept::accept(NetVConnection *netvc, MIOBuffer *iobuf, IOBufferRead
   std::string_view alpn = qvc->negotiated_application_name();
 
   if (alpn.empty() || IP_PROTO_TAG_HTTP_QUIC.compare(alpn) == 0) {
-    Debug("http3", "[%s] start HTTP/0.9 app (ALPN=%s)", qvc->cids().data(), alpn.data());
+    if (alpn.empty()) {
+      Debug("http3", "[%s] start HTTP/0.9 app (ALPN=null)", qvc->cids().data());
+    } else {
+      Debug("http3", "[%s] start HTTP/0.9 app (ALPN=%s)", qvc->cids().data(), IP_PROTO_TAG_HTTP_QUIC.data());
+    }
 
     new QUICSimpleApp(qvc, std::move(session_acl));
   } else if (IP_PROTO_TAG_HTTP_3.compare(alpn) == 0) {
-    Debug("http3", "[%s] start HTTP/3 app (ALPN=%s)", qvc->cids().data(), alpn.data());
+    Debug("http3", "[%s] start HTTP/3 app (ALPN=%s)", qvc->cids().data(), IP_PROTO_TAG_HTTP_3.data());
 
     Http3App *app = new Http3App(qvc, std::move(session_acl));
     app->start();