svn rev #25684: trunk/src/lib/krb5/asn.1/

ghudson@MIT.EDU ghudson at MIT.EDU
Sat Feb 11 18:24:52 EST 2012


http://src.mit.edu/fisheye/changelog/krb5/?cs=25684
Commit By: ghudson
Log Message:
Correct a fencepost in ASN.1 encode_cntype

For cntype_choice, count must be less than choice->n_options.


Changed Files:
U   trunk/src/lib/krb5/asn.1/asn1_encode.c
Modified: trunk/src/lib/krb5/asn.1/asn1_encode.c
===================================================================
--- trunk/src/lib/krb5/asn.1/asn1_encode.c	2012-02-10 21:19:13 UTC (rev 25683)
+++ trunk/src/lib/krb5/asn.1/asn1_encode.c	2012-02-11 23:24:52 UTC (rev 25684)
@@ -500,7 +500,7 @@
     }
     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);



More information about the cvs-krb5 mailing list