Skip Menu |
 

Subject: new warnings in pkinit code (patch needs review)
Download (untitled) / with headers
text/plain 1.3KiB
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();
From: tlyu@mit.edu
Subject: SVN Commit
In the pkinit decoders, set up things properly so that asn1buf_sync()
behaves correctly and isn't acting on uninitialized variables.


Commit By: tlyu



Revision: 19935
Changed Files:
_U trunk/
U trunk/src/lib/krb5/asn.1/asn1_k_decode.c
From: tlyu@mit.edu
Subject: SVN Commit
pull up r19935 from trunk

r19935@cathode-dark-space: tlyu | 2007-09-13 19:51:32 -0400
ticket: 5704
tags: pullup

In the pkinit decoders, set up things properly so that asn1buf_sync()
behaves correctly and isn't acting on uninitialized variables.




Commit By: tlyu



Revision: 19947
Changed Files:
_U branches/krb5-1-6/
U branches/krb5-1-6/src/lib/krb5/asn.1/asn1_k_decode.c