summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/libsmb/spnego.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/libsmb/spnego.c b/source3/libsmb/spnego.c
index 267e2f24ff..8cf2413a21 100644
--- a/source3/libsmb/spnego.c
+++ b/source3/libsmb/spnego.c
@@ -46,7 +46,7 @@ static BOOL read_negTokenInit(ASN1_DATA *asn1, negTokenInit_t *token)
for (i = 0; !asn1->has_error &&
0 < asn1_tag_remaining(asn1); i++) {
token->mechTypes =
- realloc(token->mechTypes, (i + 1) *
+ realloc(token->mechTypes, (i + 2) *
sizeof(*token->mechTypes));
asn1_read_OID(asn1, token->mechTypes + i);
}