bneradt commented on code in PR #13519:
URL: https://github.com/apache/trafficserver/pull/13519#discussion_r3738790811


##########
src/iocore/net/quic/QUICTypes.cc:
##########
@@ -723,17 +723,26 @@ QUICConnectionId::ZERO()
   return QUICConnectionId(zero, 0);
 }
 
-QUICConnectionId::QUICConnectionId()
-{
-  this->randomize();
-}
-
 QUICConnectionId::QUICConnectionId(const uint8_t *buf, uint8_t len) : _len(len)
 {
   ink_assert(len <= QUICConnectionId::MAX_LENGTH);
   memcpy(this->_id, buf, std::min(static_cast<int>(len), 
QUICConnectionId::MAX_LENGTH));
 }

Review Comment:
   Addressed. The constructor now clamps the stored length to MAX_LENGTH and 
copies exactly that clamped length while retaining the debug assertion. This 
keeps the object internally consistent in release builds.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to