Mercurial > gftp.yaz
changeset 747:c8e09269c3e1
2006-5-14 Brian Masney <masneyb@gftp.org>
* lib/sshv2.c - make sure the 64 bit data is transformed into network
byte order (from Aurelien Jarno <aurelien@aurel32.net>) (closes #168466)
author | masneyb |
---|---|
date | Mon, 15 May 2006 01:31:20 +0000 |
parents | 1b28a63d125a |
children | 08c24b6cd373 |
files | ChangeLog lib/sshv2.c |
diffstat | 2 files changed, 6 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun May 14 17:26:56 2006 +0000 +++ b/ChangeLog Mon May 15 01:31:20 2006 +0000 @@ -1,4 +1,7 @@ 2006-5-14 Brian Masney <masneyb@gftp.org> + * lib/sshv2.c - make sure the 64 bit data is transformed into network + byte order (from Aurelien Jarno <aurelien@aurel32.net>) (closes #168466) + * lib/sshv2.c (sshv2_get_file) - use SSH_FXF_READ instead of SSH_FXP_OPEN to open the file. This ensures the file can be downloaded even if the user doesn't have write access to the file. @@ -3360,7 +3363,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.426 2006/05/14 17:26:56 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.427 2006/05/15 01:31:20 masneyb Exp $ tags * debian/* - updated files from Debian maintainer
--- a/lib/sshv2.c Sun May 14 17:26:56 2006 +0000 +++ b/lib/sshv2.c Mon May 15 01:31:20 2006 +0000 @@ -1867,31 +1867,13 @@ } -#ifdef G_HAVE_GINT64 - -static gint64 -sshv2_hton64 (gint64 val) -{ -#if G_BYTE_ORDER != G_BIG_ENDIAN - return (GINT64_TO_BE (val)); -#else - return (val); -#endif -} - -#endif - - static void sshv2_setup_file_offset (sshv2_params * params, char *buf) { guint32 hinum, lownum; #ifdef G_HAVE_GINT64 - gint64 offset; - - offset = sshv2_hton64 (params->offset); - lownum = offset >> 32; - hinum = (guint32) offset; + hinum = htonl(params->offset >> 32); + lownum = htonl((guint32) params->offset); #else hinum = 0; lownum = htonl (params->offset);