summaryrefslogtreecommitdiffstats
path: root/source3/libsmb/clispnego.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-06-12 18:32:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:17:23 -0500
commit3ea740f5e5265103eacec2979c6c535eed30e346 (patch)
treecbf82132ff082607a43222347eed0137ec8a1983 /source3/libsmb/clispnego.c
parent685aed3fb4d92b59dc9032b63a296b2ed56d59d9 (diff)
downloadsamba-3ea740f5e5265103eacec2979c6c535eed30e346.tar.gz
samba-3ea740f5e5265103eacec2979c6c535eed30e346.tar.xz
samba-3ea740f5e5265103eacec2979c6c535eed30e346.zip
r16156: Fix storing NULL in the wrong place. Klocwork id's 127 and 128.
Volker (This used to be commit 7674a4f8361d3f3b649245118b82d8a074a2760e)
Diffstat (limited to 'source3/libsmb/clispnego.c')
-rw-r--r--source3/libsmb/clispnego.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c
index 13bf1a866c9..e87e9f0c7c9 100644
--- a/source3/libsmb/clispnego.c
+++ b/source3/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;