[PATCH 4/6] Subject: Bug#308136: Debian bug 308136 (SEGV in pppd)

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

 



From: Martin Lottermoser <Martin.Lottermoser@xxxxxxxxxxx>

The function update_db_entry() may only be called if pppdb is not NULL;
unfortunately in this situation it is. Other calls to update_db_entry()
are protected against this, see, e.g., the end of script_setenv().
---
 pppd/main.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/pppd/main.c b/pppd/main.c
index 014d614..3cc2624 100644
--- a/pppd/main.c
+++ b/pppd/main.c
@@ -1957,9 +1957,11 @@ script_setenv(var, value, iskey)
 		free(p-1);
 		script_env[i] = newstring;
 #ifdef USE_TDB
-		if (iskey && pppdb != NULL)
-		    add_db_key(newstring);
-		update_db_entry();
+		if (pppdb != NULL) {
+		    if (iskey)
+			add_db_key(newstring);
+		    update_db_entry();
+		}
 #endif
 		return;
 	    }
-- 
1.6.2.5

--
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