summaryrefslogtreecommitdiffstats
path: root/hw/net/mipsnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/net/mipsnet.c')
-rw-r--r--hw/net/mipsnet.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/net/mipsnet.c b/hw/net/mipsnet.c
index 740cd98ff1..cf8b8236df 100644
--- a/hw/net/mipsnet.c
+++ b/hw/net/mipsnet.c
@@ -83,6 +83,9 @@ static ssize_t mipsnet_receive(NetClientState *nc, const uint8_t *buf, size_t si
if (!mipsnet_can_receive(nc))
return 0;
+ if (size >= sizeof(s->rx_buffer)) {
+ return 0;
+ }
s->busy = 1;
/* Just accept everything. */