Problem with sftp-server on Tru64 (long long type and %ll)

mouring at etoh.eviladmin.org mouring at etoh.eviladmin.org
Mon Feb 26 10:05:04 EST 2001


A solution that you can test is to go into your config.h and set this:

/* Define if your snprintf is busted */
/* #undef BROKEN_SNPRINTF */

Then recompile and see if sftp-server and sftp work correctly.   If that
solves it then it may be better to use the internal snprintf() then
Tru64's.

- Ben

On Sun, 25 Feb 2001, Chris Adams wrote:

> The ls_file function in sftp-server.c calls snprintf with "%8llu" as
> part of the format string and a "unsigned long long" type argument.
> 
> The "%ll" format is not a valid format on Tru64 (at least 4.0F).
> Apparently it can confuse snprintf as well - sftp-server will segfault
> and core dump if the user types "ls".
> 
> This isn't really a needed format string on Tru64 anyway, since "long
> long" is just the same as "long" - both are 8 bytes.  Switching to
> "%8lu" instead works fine.
> 
> I'm not sure of the "best" way to fix this; as far as I can find, there
> is only one place in OpenSSH (except for some debugging code in
> sftp-client.c and sftp-server.c) that the "%llu" format is used.
> 






More information about the openssh-unix-dev mailing list