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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to