Apply patch from Michael Calmer to fix some uninitialized variables
authorTom Yu <tlyu@mit.edu>
Wed, 2 Aug 2006 20:51:50 +0000 (20:51 +0000)
committerTom Yu <tlyu@mit.edu>
Wed, 2 Aug 2006 20:51:50 +0000 (20:51 +0000)
* src/appl/gssftp/ftpd/ftpd.c (auth_data): Initialize stat_maj,
accept_maj, acquire_maj.

* src/appl/telnet/libtelnet/kerberos5.c (kerberos5_send):
Intialize rdata.

* src/kdc/do_tgs_req.c (process_tgs_req): Initialize magic and
tr_contents.magic.

* src/lib/krb5/asn.1/krb5_decode.c (decode_krb5_safe_with_body):
Initialize tmpbody.magic.

* src/plugins/kdb/db2/libdb2/hash/dbm.c (kdb2_fetch)
(kdb2_firstkey, kdb2_nextkey): Initialize dsize.

ticket: 3904
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18404 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/gssftp/ftpd/ftpd.c
src/appl/telnet/libtelnet/kerberos5.c
src/kdc/do_tgs_req.c
src/lib/krb5/asn.1/krb5_decode.c
src/plugins/kdb/db2/libdb2/hash/dbm.c

index 71744a57f8b13b5f0c25960a0d5ad08826294fd5..9a3639b3e4e70c3769f29c30384224982791b2f3 100644 (file)
@@ -2389,7 +2389,9 @@ char *adata;
                char service_name[MAXHOSTNAMELEN+10];
                char **gservice;
                struct hostent *hp;
-
+               stat_maj = 0;
+               accept_maj = 0;
+               acquire_maj = 0;
 
                kerror = radix_encode(adata, gout_buf, &length, 1);
                if (kerror) {
index ab8e04d3c47c62a8563052e3c0e2e9ee73ed4846..958a4ce4a6897cc5e0e6d78008d6a0890b44682c 100644 (file)
@@ -260,6 +260,7 @@ kerberos5_send(ap)
        if (telnet_krb5_realm != NULL) {
            krb5_data rdata;
 
+           rdata.magic = 0;
            rdata.length = strlen(telnet_krb5_realm);
            rdata.data = (char *) malloc(rdata.length + 1);
            if (rdata.data == NULL) {
index fd868ff36796c3e968f862acb218041474239c6d..7b9e1b573e94a73744644e2f2ab69b1ccbe2a757 100644 (file)
@@ -474,6 +474,8 @@ tgt_again:
            goto cleanup;
        }
        enc_tkt_transited.tr_type = KRB5_DOMAIN_X500_COMPRESS;
+       enc_tkt_transited.magic = 0;
+       enc_tkt_transited.tr_contents.magic = 0;
        enc_tkt_transited.tr_contents.data = 0;
        enc_tkt_transited.tr_contents.length = 0;
        enc_tkt_reply.transited = enc_tkt_transited;
index 04097b0d14cf560418cfd2943a57608acdea923c..e5cd4f845a4b7511fedc8b7a2f2c1c1e76d42e25 100644 (file)
@@ -526,6 +526,7 @@ krb5_error_code decode_krb5_safe_with_body(
   setup();
   alloc_field(*rep,krb5_safe);
   clear_field(rep,checksum);
+  tmpbody.magic = 0;
 
   check_apptag(20);
   { begin_structure();
index 58c9df7383eb561e1a52f84f180ee93722eb1bcc..43eaf444ab1e4ebb54e19986753d28f734550585 100644 (file)
@@ -90,6 +90,7 @@ kdb2_fetch(key)
        if (__cur_db == NULL) {
                no_open_db();
                item.dptr = 0;
+               item.dsize = 0;
                return (item);
        }
        return (kdb2_dbm_fetch(__cur_db, key));
@@ -103,6 +104,7 @@ kdb2_firstkey()
        if (__cur_db == NULL) {
                no_open_db();
                item.dptr = 0;
+               item.dsize = 0;
                return (item);
        }
        return (kdb2_dbm_firstkey(__cur_db));
@@ -117,6 +119,7 @@ kdb2_nextkey(key)
        if (__cur_db == NULL) {
                no_open_db();
                item.dptr = 0;
+               item.dsize = 0;
                return (item);
        }
        return (kdb2_dbm_nextkey(__cur_db));