You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/12/05 17:55:44 UTC

[GitHub] [nuttx] gustavonihei commented on a diff in pull request #7789: net/icmpv6: fix UBSan warning

gustavonihei commented on code in PR #7789:
URL: https://github.com/apache/nuttx/pull/7789#discussion_r1039908368


##########
net/icmpv6/icmpv6_input.c:
##########
@@ -336,10 +336,12 @@ void icmpv6_input(FAR struct net_driver_s *dev, unsigned int iplen)
 
                     if ((prefixopt->flags & ICMPv6_PRFX_FLAG_A) != 0)
                       {
+                        FAR void *addr = prefixopt->prefix;

Review Comment:
   You could copy `prefix` out of the packed structure. The target array would then be properly aligned.



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org