aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmeen Ali <ameenali023@gmail.com>2015-03-13 10:15:52 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-13 12:43:25 -0400
commitb57578b3d5f53016c18a9ae5365cc6e05cd70c7a (patch)
tree53bd76cad2ee3c5f87165af8923b93742786d35b
parentab3971b1e7d72270a2a259a29c1a40351b889740 (diff)
tulip_core.c : out-of-bounds check.
Array index 'j' is used before limits check. Suggest put limit check before index use. Signed-off-by : <Ameenali023@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/dec/tulip/tulip_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/dec/tulip/tulip_core.c b/drivers/net/ethernet/dec/tulip/tulip_core.c
index 3b42556f7f8d..ed41559bae77 100644
--- a/drivers/net/ethernet/dec/tulip/tulip_core.c
+++ b/drivers/net/ethernet/dec/tulip/tulip_core.c
@@ -589,7 +589,7 @@ static void tulip_tx_timeout(struct net_device *dev)
589 (unsigned int)tp->rx_ring[i].buffer1, 589 (unsigned int)tp->rx_ring[i].buffer1,
590 (unsigned int)tp->rx_ring[i].buffer2, 590 (unsigned int)tp->rx_ring[i].buffer2,
591 buf[0], buf[1], buf[2]); 591 buf[0], buf[1], buf[2]);
592 for (j = 0; buf[j] != 0xee && j < 1600; j++) 592 for (j = 0; ((j < 1600) && buf[j] != 0xee); j++)
593 if (j < 100) 593 if (j < 100)
594 pr_cont(" %02x", buf[j]); 594 pr_cont(" %02x", buf[j]);
595 pr_cont(" j=%d\n", j); 595 pr_cont(" j=%d\n", j);