# HG changeset patch # User masneyb # Date 1147656680 0 # Node ID c8e09269c3e11dab3373b4147f556baadf2a97b6 # Parent 1b28a63d125a8259119b8c4aba85a00333e4d80f 2006-5-14 Brian Masney * lib/sshv2.c - make sure the 64 bit data is transformed into network byte order (from Aurelien Jarno ) (closes #168466) diff -r 1b28a63d125a -r c8e09269c3e1 ChangeLog --- 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 + * lib/sshv2.c - make sure the 64 bit data is transformed into network + byte order (from Aurelien Jarno ) (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 diff -r 1b28a63d125a -r c8e09269c3e1 lib/sshv2.c --- 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);