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 2021/11/26 14:18:18 UTC

[GitHub] [incubator-nuttx-apps] hartmannathan commented on a change in pull request #904: netutils/dhcpc: add non-blocking interface

hartmannathan commented on a change in pull request #904:
URL: https://github.com/apache/incubator-nuttx-apps/pull/904#discussion_r757532966



##########
File path: netutils/dhcpc/dhcpc.c
##########
@@ -475,8 +520,8 @@ FAR void *dhcpc_open(FAR const char *interface, FAR const void *macaddr,
 
       memset(pdhcpc, 0, sizeof(struct dhcpc_state_s));
       pdhcpc->interface  = interface;
-      pdhcpc->ds_macaddr = macaddr;
-      pdhcpc->ds_maclen  = maclen;
+      pdhcpc->ds_maclen  = maclen > IFHWADDRLEN ? IFHWADDRLEN : maclen;

Review comment:
       If `maclen` too large, should we return error status (NULL) instead of proceeding?




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