summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-10-08 17:37:58 +1000
committerDarren Tucker <dtucker@zip.com.au>2003-10-08 17:37:58 +1000
commit796448276c37fdd76dd0770c88a6d73d1f65c18e (patch)
treeaf01254574f2c039a6b19adfe4c2decf2e1ec211
parent64dbccc2a517fb77f648e4a9aed5ae78719309bb (diff)
- deraadt@cvs.openbsd.org 2003/10/07 21:58:28
[sshconnect2.c] set ptr to NULL after free
-rw-r--r--ChangeLog9
-rw-r--r--sshconnect2.c13
2 files changed, 15 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index aa0f798b0..2ec3e8294 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,11 +2,14 @@
2 - (dtucker) OpenBSD CVS Sync 2 - (dtucker) OpenBSD CVS Sync
3 - dtucker@cvs.openbsd.org 2003/10/07 01:47:27 3 - dtucker@cvs.openbsd.org 2003/10/07 01:47:27
4 [sshconnect2.c] 4 [sshconnect2.c]
5 Don't use logit for banner, since it truncates to MSGBUFSIZ; bz #668 & #707. 5 Don't use logit for banner, since it truncates to MSGBUFSIZ; bz #668 &
6 ok markus@ 6 #707. ok markus@
7 - djm@cvs.openbsd.org 2003/10/07 07:04:16 7 - djm@cvs.openbsd.org 2003/10/07 07:04:16
8 [sftp-int.c] 8 [sftp-int.c]
9 sftp quoting fix from admorten AT umich.edu; ok markus@ 9 sftp quoting fix from admorten AT umich.edu; ok markus@
10 - deraadt@cvs.openbsd.org 2003/10/07 21:58:28
11 [sshconnect2.c]
12 set ptr to NULL after free
10 13
1120031007 1420031007
12 - (djm) Delete autom4te.cache after autoreconf 15 - (djm) Delete autom4te.cache after autoreconf
@@ -1302,4 +1305,4 @@
1302 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. 1305 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
1303 Report from murple@murple.net, diagnosis from dtucker@zip.com.au 1306 Report from murple@murple.net, diagnosis from dtucker@zip.com.au
1304 1307
1305$Id: ChangeLog,v 1.3065 2003/10/08 07:34:38 dtucker Exp $ 1308$Id: ChangeLog,v 1.3066 2003/10/08 07:37:58 dtucker Exp $
diff --git a/sshconnect2.c b/sshconnect2.c
index 4e3ae2de7..2ef4201ce 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: sshconnect2.c,v 1.125 2003/10/07 01:47:27 dtucker Exp $"); 26RCSID("$OpenBSD: sshconnect2.c,v 1.126 2003/10/07 21:58:28 deraadt Exp $");
27 27
28#include "openbsd-compat/sys-queue.h" 28#include "openbsd-compat/sys-queue.h"
29 29
@@ -358,6 +358,7 @@ void
358input_userauth_banner(int type, u_int32_t seq, void *ctxt) 358input_userauth_banner(int type, u_int32_t seq, void *ctxt)
359{ 359{
360 char *msg, *lang; 360 char *msg, *lang;
361
361 debug3("input_userauth_banner"); 362 debug3("input_userauth_banner");
362 msg = packet_get_string(NULL); 363 msg = packet_get_string(NULL);
363 lang = packet_get_string(NULL); 364 lang = packet_get_string(NULL);
@@ -373,10 +374,14 @@ input_userauth_success(int type, u_int32_t seq, void *ctxt)
373 Authctxt *authctxt = ctxt; 374 Authctxt *authctxt = ctxt;
374 if (authctxt == NULL) 375 if (authctxt == NULL)
375 fatal("input_userauth_success: no authentication context"); 376 fatal("input_userauth_success: no authentication context");
376 if (authctxt->authlist) 377 if (authctxt->authlist) {
377 xfree(authctxt->authlist); 378 xfree(authctxt->authlist);
378 if (authctxt->methoddata) 379 authctxt->authlist = NULL;
380 }
381 if (authctxt->methoddata) {
379 xfree(authctxt->methoddata); 382 xfree(authctxt->methoddata);
383 authctxt->methoddata = NULL;
384 }
380 authctxt->success = 1; /* break out */ 385 authctxt->success = 1; /* break out */
381} 386}
382 387
@@ -609,7 +614,7 @@ input_gssapi_token(int type, u_int32_t plen, void *ctxt)
609 614
610 packet_check_eom(); 615 packet_check_eom();
611 616
612 status=ssh_gssapi_init_ctx(gssctxt, options.gss_deleg_creds, 617 status = ssh_gssapi_init_ctx(gssctxt, options.gss_deleg_creds,
613 &recv_tok, &send_tok, NULL); 618 &recv_tok, &send_tok, NULL);
614 619
615 xfree(recv_tok.value); 620 xfree(recv_tok.value);