From 023aac4a5d682ffeacc5121deaa771e08a5c9013 Mon Sep 17 00:00:00 2001 From: Benjamin Kaduk Date: Tue, 31 Jul 2012 16:12:27 -0400 Subject: Avoid a crash when attempting to change password In some cases we could keep stack garbage in a local pointer variable until the cleanup at the end of the function wherein krb5_free_context() would choke on the invalid non-NULL value. Initialize to zero to avoid the issue (should be written as NULL but stick to the prevailing style). ticket: 7329 (new) queue: kfw target_version: 1.10.4 tags: pullup --- src/windows/leash/LeashView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/windows/leash/LeashView.cpp') diff --git a/src/windows/leash/LeashView.cpp b/src/windows/leash/LeashView.cpp index eedc5a2064..51777e4081 100644 --- a/src/windows/leash/LeashView.cpp +++ b/src/windows/leash/LeashView.cpp @@ -1034,7 +1034,7 @@ VOID CLeashView::OnMakeDefault() VOID CLeashView::OnChangePassword() { - krb5_context ctx; + krb5_context ctx = 0; krb5_ccache ccache = 0; krb5_principal princ = 0; char *pname = NULL; -- cgit