summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2003-07-31 15:53:59 +0000
committerVolker Lendecke <vlendec@samba.org>2003-07-31 15:53:59 +0000
commitc13fac26c50b510a936567adc2206b6390d6edee (patch)
treebd5b255eec93f7f1c3379a2183795ca90dacd74c /source3/libsmb
parent34b15df02dce7b9e48c1d2987929053e36b9ef31 (diff)
downloadsamba-c13fac26c50b510a936567adc2206b6390d6edee.tar.gz
samba-c13fac26c50b510a936567adc2206b6390d6edee.tar.bz2
samba-c13fac26c50b510a936567adc2206b6390d6edee.zip
Fix off-by-one found by valgrind.
Volker (This used to be commit bc39c9b57fa6258674e1ee44b3446f25bf63661e)
Diffstat (limited to 'source3/libsmb')
-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);
}