aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/atm/solos-pci.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
index bfef8d255811..6c828347c9cc 100644
--- a/drivers/atm/solos-pci.c
+++ b/drivers/atm/solos-pci.c
@@ -671,6 +671,10 @@ void solos_bh(unsigned long card_arg)
671 memcpy_fromio(header, RX_BUF(card, port), sizeof(*header)); 671 memcpy_fromio(header, RX_BUF(card, port), sizeof(*header));
672 672
673 size = le16_to_cpu(header->size); 673 size = le16_to_cpu(header->size);
674 if (size > (card->buffer_size - sizeof(*header))){
675 dev_warn(&card->dev->dev, "Invalid buffer size\n");
676 continue;
677 }
674 678
675 skb = alloc_skb(size + 1, GFP_ATOMIC); 679 skb = alloc_skb(size + 1, GFP_ATOMIC);
676 if (!skb) { 680 if (!skb) {