diff options
Diffstat (limited to 'patches/ppp-2.4.4/ppp-2.4.4-protect-update_db_entry.diff')
-rw-r--r-- | patches/ppp-2.4.4/ppp-2.4.4-protect-update_db_entry.diff | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/patches/ppp-2.4.4/ppp-2.4.4-protect-update_db_entry.diff b/patches/ppp-2.4.4/ppp-2.4.4-protect-update_db_entry.diff new file mode 100644 index 000000000..352488f95 --- /dev/null +++ b/patches/ppp-2.4.4/ppp-2.4.4-protect-update_db_entry.diff @@ -0,0 +1,30 @@ +From: Martin.Lottermoser@t-online.de +Subject: Bug#308136: Debian bug 308136 (SEGV in pppd) + +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 file changed, 5 insertions(+), 3 deletions(-) + +Index: pppd/main.c +=================================================================== +--- pppd/main.c.orig ++++ pppd/main.c +@@ -1939,9 +1939,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; + } |