diff --git a/features/netsocket/emac-drivers/TARGET_STM/stm32xx_emac.cpp b/features/netsocket/emac-drivers/TARGET_STM/stm32xx_emac.cpp old mode 100644 new mode 100755 index a13e4d124c..55f82b16cb --- a/features/netsocket/emac-drivers/TARGET_STM/stm32xx_emac.cpp +++ b/features/netsocket/emac-drivers/TARGET_STM/stm32xx_emac.cpp @@ -546,7 +546,7 @@ int STM32_EMAC::low_level_input(emac_mem_buf_t **buf) dmarxdesc = EthHandle.RxFrameInfos.FSRxDesc; - if (len > 0) { + if (len > 0 && EthHandle.RxFrameInfos.length <= 1500) { /* Allocate a memory buffer chain from buffer pool */ *buf = memory_manager->alloc_pool(len, 0); }