diff options
author | Jeremy Allison <jra@samba.org> | 2012-09-25 16:35:09 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2012-11-01 09:10:35 +0100 |
commit | f3e95040096b727665a34263a1e1295ffedf1932 (patch) | |
tree | 0760e1af4edadd06304d032fdf59f789ccd9e24a | |
parent | bf27038ead0be058cf7f3fca19ddc67ed808c8a0 (diff) | |
download | samba-f3e95040096b727665a34263a1e1295ffedf1932.tar.gz |
Fix bug #9213 - Bad ASN.1 NegTokenInit packet can cause invalid free.
Not the correct fix for the specific issue, but a general fix to
make sure this can never happen again.
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Sep 26 04:07:57 CEST 2012 on sn-devel-104
(cherry picked from commit 83f60672e1b3069e6b1b90b376460da895e37df3)
(cherry picked from commit d0b872ea7ca112d047b9ee2d10d1a75a2ee4aed3)
(cherry picked from commit 1b85990b833fe4ef2007e82ffe26ee18f87cb464)
-rw-r--r-- | source3/libsmb/clispnego.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c index 33225290f9e..49b484b56c2 100644 --- a/source3/libsmb/clispnego.c +++ b/source3/libsmb/clispnego.c @@ -136,6 +136,10 @@ bool spnego_parse_negTokenInit(DATA_BLOB blob, bool ret; ASN1_DATA *data; + for (i = 0; i < ASN1_MAX_OIDS; i++) { + OIDs[i] = NULL; + } + data = asn1_init(talloc_tos()); if (data == NULL) { return false; |