OpenSSH 3.7 testing (Re: 3.6p1 bug on SCO OpenServer)

Ben Lindstrom mouring at
Tue Sep 9 14:40:54 EST 2003

On Tue, 9 Sep 2003, Darren Tucker wrote:

> Wendy Palm wrote:
> > i'm getting a fatal compiler error in do_upload() in sftp-client.c -
> >
> > CC-167 cc: WARNING File = sftp-client.c, Line = 1046
> >    Argument of type "u_int64_t *" is incompatible with parameter of type "off_t *"
> >            .
> >
> >                  start_progress_meter(local_path, sb.st_size, &offset);
> >
> > due to offset being defined as u_int64_t rather than off_t.
> >
> > off_t on the machines i checked is signed, and other calls to start_progress_meter in

Eep.. am I the only one that thinks that is wrong? =)  off_t signed?
sounds like a bad deal.

> > other functions seem to be correct.
> I'm not sure that's the right solution, since offset is used for
> populating the packet and is defined in the (expired)
> draft-ietf-secsh-filexfer as uint64.

In either case there are places were we will need too typecast to ensure
the compiler does not screw up.

In either case not sure how often we will hit that signed vs unsigned
boundry.  In either case it will screw up on Cray or any other OS with
this issue.

The simple solution is to find the lseek (which I think is the only issue)
and typecast it to (off_t).  Which it more than likely should have been to
start with.

What does Cray do if  lseek is given a negative number?  Does it convert
it to unsigned or is it 'undefined' or a 'fubar case'?

- Ben

More information about the openssh-unix-dev mailing list