[prev in list] [next in list] [prev in thread] [next in thread] 

List:       krb5-bugs
Subject:    [krbdev.mit.edu #5704] new warnings in pkinit code (patch needs
From:       "Ken Raeburn via RT" <rt-comment () krbdev ! mit ! edu>
Date:       2007-08-30 0:53:54
Message-ID: rt-5704-24641.5.38236012262836 () krbdev ! mit ! edu
[Download RAW message or body]

From: 	  raeburn@MIT.EDU
Date: 	August 8, 2007 1:30:01 EDT
To: 	  kwc@citi.umich.edu
Cc: 	  krbdev@mit.edu

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.

Ken

From: 	  kwc@citi.umich.edu
Date: 	August 8, 2007 15:58:29 EDT
To: 	  raeburn@mit.edu
Cc: 	  krbdev@mit.edu

[...quotations elided...]
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();

_______________________________________________
krb5-bugs mailing list
krb5-bugs@mit.edu
https://mailman.mit.edu/mailman/listinfo/krb5-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic