pull up r18635 from trunk
authorTom Yu <tlyu@mit.edu>
Thu, 26 Oct 2006 19:31:24 +0000 (19:31 +0000)
committerTom Yu <tlyu@mit.edu>
Thu, 26 Oct 2006 19:31:24 +0000 (19:31 +0000)
 r18635@cathode-dark-space:  epeisach | 2006-10-01 08:05:20 -0400
 ticket: new
 subject: kdc: make_toolong_error does not initialize all fields for krb5_mk_error
 tags: pullup

 network.c: make_too_long_error() fails to set the ctime and cusec elements of
 the krb5_error structure. Valgrind detects errors in the asn.1 encoding
 handlers in reading an unitialized value. Initialize to 0.

ticket: 4368
version_fixed: 1.5.2

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-5@18740 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/network.c

index f7bb958f3e7c0668474ab3f3426f61e36d5d8468..2f08faea2c1cf84b57a0c7301453077f5b943332 100644 (file)
@@ -904,6 +904,8 @@ make_toolong_error (krb5_data **out)
     errpkt.error = KRB_ERR_FIELD_TOOLONG;
     errpkt.server = tgs_server;
     errpkt.client = NULL;
+    errpkt.cusec = 0;
+    errpkt.ctime = 0;
     errpkt.text.length = 0;
     errpkt.text.data = 0;
     errpkt.e_data.length = 0;