svn rev #25299: trunk/src/ kdc/ lib/apputils/
ghudson@MIT.EDU
ghudson at MIT.EDU
Tue Oct 4 18:40:10 EDT 2011
http://src.mit.edu/fisheye/changelog/krb5/?cs=25299
Commit By: ghudson
Log Message:
Fix initialization and pointer bugs in new code.
Coverity found some minor-to-medium bugs in some recent changes; fix
them.
Changed Files:
U trunk/src/kdc/do_as_req.c
U trunk/src/lib/apputils/net-server.c
Modified: trunk/src/kdc/do_as_req.c
===================================================================
--- trunk/src/kdc/do_as_req.c 2011-10-04 20:16:07 UTC (rev 25298)
+++ trunk/src/kdc/do_as_req.c 2011-10-04 22:40:10 UTC (rev 25299)
@@ -131,7 +131,7 @@
krb5_key_data *server_key;
krb5_key_data *client_key;
krb5_keyblock *as_encrypting_key = NULL;
- krb5_data *response;
+ krb5_data *response = NULL;
const char *emsg = 0;
int did_log = 0;
register int i;
@@ -468,6 +468,7 @@
state->request = request;
state->e_data = NULL;
state->authtime = 0;
+ state->c_flags = 0;
state->req_pkt = req_pkt;
state->rstate = NULL;
state->sname = 0;
Modified: trunk/src/lib/apputils/net-server.c
===================================================================
--- trunk/src/lib/apputils/net-server.c 2011-10-04 20:16:07 UTC (rev 25298)
+++ trunk/src/lib/apputils/net-server.c 2011-10-04 22:40:10 UTC (rev 25299)
@@ -1548,7 +1548,7 @@
if (code)
com_err(state->prog ? state->prog : NULL, code,
_("while dispatching (udp)"));
- if (code || response == NULL || state == NULL)
+ if (code || response == NULL)
goto out;
cc = send_to_from(state->port_fd, response->data,
@@ -1900,8 +1900,10 @@
}
state = prepare_for_dispatch(ctx, ev);
- if (!state)
+ if (!state) {
+ krb5_free_data(get_context(conn->handle), response);
goto kill_tcp_connection;
+ }
process_tcp_response(state, 0, response);
}
}
More information about the cvs-krb5
mailing list