]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Avoid a crash when attempting to change password
authorBenjamin Kaduk <kaduk@mit.edu>
Tue, 31 Jul 2012 20:12:27 +0000 (16:12 -0400)
committerBen Kaduk <kaduk@mit.edu>
Wed, 29 Aug 2012 18:50:20 +0000 (14:50 -0400)
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

index eedc5a20648668949dbb13f99ba0f24f22f3401f..51777e4081b593edc896853003b93f6b119aed51 100644 (file)
@@ -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;