new warnings in build with pkinit code

Kevin Coffman kwc at citi.umich.edu
Wed Aug 8 15:58:29 EDT 2007


On 8/8/07, Kevin Coffman <kwc at citi.umich.edu> wrote:
> On 8/8/07, Ken Raeburn <raeburn at mit.edu> wrote:
> > lib/krb5/asn.1/asn1_k_decode.c: In function
> > 'asn1_decode_algorithm_identifier':
> > lib/krb5/asn.1/asn1_k_decode.c:1346: warning: 'asn1class' is used
> > uninitialized in this function
> > lib/krb5/asn.1/asn1_k_decode.c:1346: warning: 'tagnum' is used
> > uninitialized in this function
> > lib/krb5/asn.1/asn1_k_decode.c:1346: warning: 'indef' is used
> > uninitialized in this function
> >
> > It looks to me like these values will control how the processing is
> > done at the end of the structure (e.g., whether to look for the tail
> > end of an indefinite encoding), so leaving them uninitialized is a
> > bad idea.
>
> Agreed.  Thanks, I'm looking into this.

Can someone (Tom?) look at this and comment whether these are the
right values to use.

Thanks,
K.C.

Index: asn1_k_decode.c
===================================================================
--- asn1_k_decode.c     (revision 19759)
+++ asn1_k_decode.c     (working copy)
@@ -1343,6 +1343,11 @@
       val->parameters.length = size;
     }

+    /* There is no tag, so we set these just in case seqindef is nonzero */
+    tagnum = ASN1_TAGNUM_CEILING;
+    asn1class = UNIVERSAL;
+    indef = 0;
+
     end_structure();
   }
   cleanup();



More information about the krbdev mailing list