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 6b2773c  QUIC: Fixed crash when records connection id frame
6b2773c is described below

commit 6b2773c82f4ab05b4bd2983fe9ca52321c3bb798
Author: scw00 <sc...@apache.org>
AuthorDate: Fri Feb 15 13:48:07 2019 +0800

    QUIC: Fixed crash when records connection id frame
---
 iocore/net/quic/QUICAltConnectionManager.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/iocore/net/quic/QUICAltConnectionManager.cc 
b/iocore/net/quic/QUICAltConnectionManager.cc
index 0e284e8..7a7980d 100644
--- a/iocore/net/quic/QUICAltConnectionManager.cc
+++ b/iocore/net/quic/QUICAltConnectionManager.cc
@@ -283,11 +283,11 @@ QUICAltConnectionManager::generate_frame(uint8_t *buf, 
QUICEncryptionLevel level
         if (frame && frame->size() > maximum_frame_size) {
           // Cancel generating frame
           frame = nullptr;
-        } else {
+        } else if (frame != nullptr) {
+          this->_records_new_connection_id_frame(level, static_cast<const 
QUICNewConnectionIdFrame &>(*frame));
           this->_alt_quic_connection_ids_local[i].advertised = true;
         }
 
-        this->_records_new_connection_id_frame(level, static_cast<const 
QUICNewConnectionIdFrame &>(*frame));
         return frame;
       }
     }

Reply via email to