We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6eb4808 commit 324938bCopy full SHA for 324938b
drivers/ethernet/eth_enc424j600.c
@@ -374,6 +374,11 @@ static int enc424j600_rx(struct device *dev)
374
context->next_pkt_ptr, frm_len, status);
375
/* frame length without FCS */
376
frm_len -= 4;
377
+ if (frm_len > NET_ETH_MAX_FRAME_SIZE) {
378
+ LOG_ERR("Maximum frame length exceeded");
379
+ eth_stats_update_errors_rx(context->iface);
380
+ goto done;
381
+ }
382
383
/* Get the frame from the buffer */
384
pkt = net_pkt_rx_alloc_with_buffer(context->iface, frm_len,
0 commit comments