Bug in session.c?
Ben Lindstrom
mouring at pconline.com
Fri Aug 25 15:15:55 EST 2000
On Fri, 25 Aug 2000, Damien Miller wrote:
> On Thu, 24 Aug 2000, Mark Miller wrote:
>
> > I think I have discovered a bug in the 20000823 snapshot of session.c ...
> >
> > Beginning at line 1229:
> >
> > if (screen != NULL)
> > fprintf(stderr,
> > "Adding %.*s/unix%s %s %s\n",
> > Both fprintf() calls have four string arguments, but contain five variables.
> >
> > What do you think?
>
> I think that you should read the manpage for printf :)
>
> the .* construct specifies the width of the format using one of the
> arguments.
>
> -d
>
Never used %.*s myself so I had to look it up.. but older gcc does grumble
about the line:
fprintf(stderr,"Adding %.*s/unix%s %s %s\n",
screen - display,
display,
screen,
auth_proto,
auth_data);
"screen - display" needs to be changed to "(int) (screen - display)" to
ensure type casting is correct for older compilers so they don't grumble
so loud.
More information about the openssh-unix-dev
mailing list