SofianElmotiem commented on code in PR #21392:
URL: https://github.com/apache/nuttx/pull/21392#discussion_r4451976190


##########
drivers/net/lan9250.c:
##########
@@ -842,6 +847,8 @@ static void lan9250_recv_buffer(FAR struct lan9250_driver_s 
*priv,
                                 FAR uint8_t *buffer,
                                 size_t buflen)
 {
+  DEBUGASSERT(buflen <= sizeof(priv->pktbuf));

Review Comment:
   Good catch, my bad. I moved it out of the `#ifdef CONFIG_LAN9250_SPI` block 
so the SQI path gets the check too, but ended up putting it before the 
declarations. Fixed now: it's back where it was in the SPI path, and the SQI 
path has the same check after its declarations.



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