diff options
| author | Greg Hudson <ghudson@mit.edu> | 2012-02-11 23:24:52 +0000 |
|---|---|---|
| committer | Greg Hudson <ghudson@mit.edu> | 2012-02-11 23:24:52 +0000 |
| commit | 36460f0afcaf8d9c56200541ef9c3cca38e87b98 (patch) | |
| tree | e7cb628be5189ef30da66c07fcca7eb844f070b6 | |
| parent | 075e5e49c59fbc9611d8ab96524cfde4209713f5 (diff) | |
| download | krb5-36460f0afcaf8d9c56200541ef9c3cca38e87b98.tar.gz krb5-36460f0afcaf8d9c56200541ef9c3cca38e87b98.tar.xz krb5-36460f0afcaf8d9c56200541ef9c3cca38e87b98.zip | |
Correct a fencepost in ASN.1 encode_cntype
For cntype_choice, count must be less than choice->n_options.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25684 dc483132-0cff-0310-8789-dd5450dbe970
| -rw-r--r-- | src/lib/krb5/asn.1/asn1_encode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/krb5/asn.1/asn1_encode.c b/src/lib/krb5/asn.1/asn1_encode.c index 48ecc2ff6..7385cfa63 100644 --- a/src/lib/krb5/asn.1/asn1_encode.c +++ b/src/lib/krb5/asn.1/asn1_encode.c @@ -500,7 +500,7 @@ encode_cntype(asn1buf *buf, const void *val, unsigned int count, } case cntype_choice: { const struct choice_info *choice = c->tinfo; - if (count > choice->n_options) + if (count >= choice->n_options) return ASN1_MISSING_FIELD; return krb5int_asn1_encode_type(buf, val, choice->options[count], rettag); |
