Zepp-Hanzj commented on code in PR #19000:
URL: https://github.com/apache/nuttx/pull/19000#discussion_r3334662524
##########
arch/sim/src/sim/sim_usrsock.c:
##########
@@ -357,15 +357,28 @@ static int usrsock_ioctl_handler(struct usrsock_s
*usrsock,
{
const struct usrsock_request_ioctl_s *req = data;
struct usrsock_message_datareq_ack_s *ack;
+ size_t copylen;
int ret;
+ if (len < sizeof(*req))
+ {
+ return -EINVAL;
Review Comment:
Done. Added `nerr()` messages to both validation paths with actual values
for easier debugging.
--
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]