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

Chris Adams cmadams at hiwaay.net
Mon Feb 26 09:04:25 EST 2001


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.
-- 
Chris Adams <cmadams at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.





More information about the openssh-unix-dev mailing list