diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-06-12 18:32:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:17:23 -0500 |
commit | 7674a4f8361d3f3b649245118b82d8a074a2760e (patch) | |
tree | eeedaf972ee1a1c36acffac3208ba04e8e23f592 /source/libsmb/clispnego.c | |
parent | da768bf9c2761884cc97f690133d6897ed353e15 (diff) | |
download | samba-7674a4f8361d3f3b649245118b82d8a074a2760e.tar.gz samba-7674a4f8361d3f3b649245118b82d8a074a2760e.tar.xz samba-7674a4f8361d3f3b649245118b82d8a074a2760e.zip |
r16156: Fix storing NULL in the wrong place. Klocwork id's 127 and 128.
Volker
Diffstat (limited to 'source/libsmb/clispnego.c')
-rw-r--r-- | source/libsmb/clispnego.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/libsmb/clispnego.c b/source/libsmb/clispnego.c index 13bf1a866c9..e87e9f0c7c9 100644 --- a/source/libsmb/clispnego.c +++ b/source/libsmb/clispnego.c @@ -140,7 +140,7 @@ BOOL spnego_parse_negTokenInit(DATA_BLOB blob, asn1_start_tag(&data,ASN1_CONTEXT(0)); asn1_start_tag(&data,ASN1_SEQUENCE(0)); - for (i=0; asn1_tag_remaining(&data) > 0 && i < ASN1_MAX_OIDS; i++) { + for (i=0; asn1_tag_remaining(&data) > 0 && i < ASN1_MAX_OIDS-1; i++) { char *oid_str = NULL; asn1_read_OID(&data,&oid_str); OIDs[i] = oid_str; @@ -229,7 +229,7 @@ BOOL parse_negTokenTarg(DATA_BLOB blob, char *OIDs[ASN1_MAX_OIDS], DATA_BLOB *se asn1_start_tag(&data, ASN1_CONTEXT(0)); asn1_start_tag(&data, ASN1_SEQUENCE(0)); - for (i=0; asn1_tag_remaining(&data) > 0 && i < ASN1_MAX_OIDS; i++) { + for (i=0; asn1_tag_remaining(&data) > 0 && i < ASN1_MAX_OIDS-1; i++) { char *oid_str = NULL; asn1_read_OID(&data,&oid_str); OIDs[i] = oid_str; |