ssh-keygen opens NULL filename
Tim Rice
tim at multitalents.net
Thu Oct 17 05:45:57 EST 2002
On Wed, 16 Oct 2002, [iso-8859-2] Martin MOKREJ© wrote:
> Hi,
> I did few checks and as I'm not C proghrammer at all, have just few
> points regarding ssh-keygen.c:
>
> 905 if (strstr(identity_file, dotsshdir) != NULL &&
>
> isn't the above line missing a closing bracket?
The closing bracket is on the next line
if (strstr(identity_file, dotsshdir) != NULL &&
stat(dotsshdir, &st) < 0) {
^-- here it is.
>
> 956 snprintf(comment, sizeof comment, "%s@%s", pw->pw_name, hostname);
>
> -----------------------------------------------^ sizeof(comment) instead?
Acording to "C A Reference Manual" third edition,
sizeof-expression:
sizeof ( type-name )
sizeof unary-expression
The sizeof expression has two forms: the operator sizeof followed by a
parenthesized type name, or the operator sizeof followed by an
operand expression.
The compiler is probably able to figure it out.
Seems like we would want to be consistant though.
It looks like there are 772 other lines spread through 33 files that
use sizeof without parens.
>
>
> The identity_file variable contents somehow change over time, isn't that
> my problem? Same with hostname for example.
>
>
--
Tim Rice Multitalents (707) 887-1469
tim at multitalents.net
More information about the openssh-unix-dev
mailing list