ProxyCommand broken in SNAP-20010814

mouring at etoh.eviladmin.org mouring at etoh.eviladmin.org
Thu Aug 16 08:24:46 EST 2001


<frown> That is wierd.. I could have swore I was doing that test
under OpenBSD 2.8 and not on my Linux box.

Sorry..  I'll take care of it in a few minutes.

- Ben
Confuzed...


On Wed, 15 Aug 2001, Kevin Steves wrote:

> On Wed, 15 Aug 2001, Pavel Kankovsky wrote:
> :For some odd reason, one line was removed from the handling of
> :ProxyCommand in readconf.c. As a result, ssh crashes on strlen(string)
> :when it parses this option.
> :
> :--- readconf.c:X	Mon Aug  6 23:35:52 2001
> :+++ readconf.c	Wed Aug 15 16:11:44 2001
> :@@ -475,6 +475,7 @@
> :
> : 	case oProxyCommand:
> : 		charptr = &options->proxy_command;
> :+		string = xstrdup("");
> : 		while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
> : 			string = xrealloc(string, strlen(string) + strlen(arg) + 2); 			strcat(string, " ");
>
> this was the change, with the commit message below.  i'm guessing a local
> change ben was working on accidentally made it into this commit.  it looks
> like the goal was to use xrealloc(NULL,...).
>
> Index: readconf.c
> ===================================================================
> RCS file: /var/cvs/openssh/readconf.c,v
> retrieving revision 1.55
> retrieving revision 1.56
> diff -u -r1.55 -r1.56
> --- readconf.c	2001/07/04 04:21:16	1.55
> +++ readconf.c	2001/08/06 20:47:24	1.56
> @@ -256,7 +256,8 @@
>  		    char *line, const char *filename, int linenum,
>  		    int *activep)
>  {
> -	char buf[256], *s, *string, **charptr, *endofnumber, *keyword, *arg;
> +	char buf[256], *s, *string = NULL, **charptr, *endofnumber, *keyword,
> +	    *arg;
>  	int opcode, *intptr, value;
>  	u_short fwd_port, fwd_host_port;
>
> @@ -469,7 +470,6 @@
>
>  	case oProxyCommand:
>  		charptr = &options->proxy_command;
> -		string = xstrdup("");
>  		while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
>  			string = xrealloc(string, strlen(string) + strlen(arg) + 2);
>  			strcat(string, " ");
>
> revision 1.56
> date: 2001/08/06 20:47:24;  author: mouring;  state: Exp;  lines: +2 -2
>    - markus at cvs.openbsd.org 2001/07/22 21:32:27
>      [sshpty.c]
>      update comment
>
>




More information about the openssh-unix-dev mailing list