The branch, master has been updated
       via  ef194bc... s3-spnego: fix memleak in spnego_parse_auth().
      from  449ab39... s3-spnego: Fix Bug #6815. Windows 2008 R2 SPNEGO 
negTokenTarg parsing failure.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit ef194bc692d4bb5fddc2c437ce66aa32080ca2dc
Author: Günther Deschner <g...@samba.org>
Date:   Thu Oct 15 15:45:20 2009 +0200

    s3-spnego: fix memleak in spnego_parse_auth().
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source3/libsmb/clispnego.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c
index 1103ef8..e20749b 100644
--- a/source3/libsmb/clispnego.c
+++ b/source3/libsmb/clispnego.c
@@ -507,10 +507,14 @@ bool spnego_parse_auth(DATA_BLOB blob, DATA_BLOB *auth)
        if (token.type != SPNEGO_NEG_TOKEN_TARG) {
                DEBUG(3,("spnego_parse_auth: wrong token type: %d\n",
                        token.type));
+               spnego_free_data(&token);
                return false;
        }
 
-       *auth = token.negTokenTarg.responseToken;
+       *auth = data_blob_talloc(talloc_tos(),
+                                token.negTokenTarg.responseToken.data,
+                                token.negTokenTarg.responseToken.length);
+       spnego_free_data(&token);
 
        return true;
 }


-- 
Samba Shared Repository

Reply via email to