[riot-notifications] [RIOT-OS/RIOT] uhcp: fix handling of pushed prefix (#15359)

Martine Lenders notifications at github.com
Tue Nov 3 12:21:07 CET 2020


@miri64 commented on this pull request.



> @@ -97,14 +97,17 @@ void uhcp_handle_push(uhcp_push_t *req, uint8_t *src, uint16_t port, uhcp_iface_
     char addr_str[INET6_ADDRSTRLEN];
     char prefix_str[INET6_ADDRSTRLEN];
     inet_ntop(AF_INET6, src, addr_str, INET6_ADDRSTRLEN);
-    uint8_t prefix[16];
+    uint8_t prefix[IN6ADDRSZ] = { 0 };

I also prefer to keep variable declarations at the top of the block they are used in ;-). I kept `prefix_bytes` only where it is, because it already was there.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15359#discussion_r516594195
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201103/c8c7112d/attachment.htm>


More information about the notifications mailing list