bryancall commented on code in PR #10914:
URL: https://github.com/apache/trafficserver/pull/10914#discussion_r1420868746


##########
include/tscore/ink_inet.h:
##########
@@ -742,6 +742,8 @@ ats_ip_copy(sockaddr *dst,      ///< Destination object.
   }
   if (n) {
     if (src != dst) {
+      // It can access beyond sizeof(sockaddr) but the real size is checked 
above
+      // coverity[access_dbuff_const]
       memcpy(dst, src, n);

Review Comment:
   The problem is with this  function is you don't know how large the caller 
allocated for sockaddr.  Here are the sizes of the different sockaddrs..
   
   sizeof(sockaddr) = 16
   sizeof(sockaddr_in) = 16
   sizeof(sockaddr_in6) = 28
   



-- 
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