[PATCH] ppp: ppp_generic.c initialize flen before it get used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When while loop runs first time flen is used uninitialized for nfree <= 0

This also fixed compilation warning :
  CC [M]  drivers/net/ppp_generic.o
drivers/net/ppp_generic.c: In function ‘ppp_mp_explode’:
drivers/net/ppp_generic.c:1314: warning: ‘flen’ may be used uninitialized in this function

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@xxxxxxxxx>
---
 drivers/net/ppp_generic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index cd37d73..b1a1a06 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -1311,7 +1311,7 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
 {
 	int	len, totlen;
 	int	i, bits, hdrlen, mtu;
-	int	flen;
+	int	flen = 0;
 	int	navail,	nfree, nzero;
 	int	nbigger;
 	int	totspeed;
-- 
1.6.4.2


--
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Audio Users]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux