masaori335 commented on code in PR #13133:
URL: https://github.com/apache/trafficserver/pull/13133#discussion_r3223769770
##########
src/iocore/cache/P_CacheDoc.h:
##########
@@ -82,6 +82,10 @@ Doc::prefix_len() const
inline uint32_t
Doc::data_len() const
{
+ if (this->len <= sizeof(self_type) + this->hlen) {
+ return 0;
+ }
+
return this->len - sizeof(self_type) - this->hlen;
Review Comment:
It's nice to have, but not necessary.
--
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]