mirror of
				https://github.com/libssh2/libssh2.git
				synced 2025-11-03 22:13:11 +03:00 
			
		
		
		
	- Based on a patch in bug #1878059 by Steven Ayre libssh2 now parses >2GB file
sizes when downloading SCP files.
This commit is contained in:
		
							
								
								
									
										6
									
								
								NEWS
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								NEWS
									
									
									
									
									
								
							@@ -1,7 +1,11 @@
 | 
				
			|||||||
Version 0.19 ( )
 | 
					Version 0.19 ( )
 | 
				
			||||||
-------------------------------
 | 
					-------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Bug #2064371 pointed out that the SSH2 banner may not use dash ('-').
 | 
					- Based on a patch in bug #1878059 by Steven Ayre libssh2 now parses >2GB file
 | 
				
			||||||
 | 
					  sizes when downloading SCP files.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Bug #2064371 pointed out that the SSH2 banner may not use dash ('-'). Reported
 | 
				
			||||||
 | 
					  by Bjorn Stenborg.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Sean Peterson fixed a key re-exchange bug:
 | 
					- Sean Peterson fixed a key re-exchange bug:
 | 
				
			||||||
  http://daniel.haxx.se/projects/libssh2/mail/libssh2-devel-archive-2008-06/0002.shtml
 | 
					  http://daniel.haxx.se/projects/libssh2/mail/libssh2-devel-archive-2008-06/0002.shtml
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -40,6 +40,11 @@ case "$host" in
 | 
				
			|||||||
    ;;
 | 
					    ;;
 | 
				
			||||||
esac
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					AC_CHECK_TYPE(long long,
 | 
				
			||||||
 | 
					   [AC_DEFINE(HAVE_LONGLONG, 1,
 | 
				
			||||||
 | 
					      [Define to 1 if the compiler supports the 'long long' data type.])]
 | 
				
			||||||
 | 
					   longlong="yes"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
# Some systems (Solaris?) have socket() in -lsocket.
 | 
					# Some systems (Solaris?) have socket() in -lsocket.
 | 
				
			||||||
AC_SEARCH_LIBS(socket, socket)
 | 
					AC_SEARCH_LIBS(socket, socket)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -249,7 +254,7 @@ AC_HELP_STRING([--disable-debug],[Disable debug options]),
 | 
				
			|||||||
AC_CHECK_HEADERS([errno.h fcntl.h stdio.h stdlib.h unistd.h sys/uio.h])
 | 
					AC_CHECK_HEADERS([errno.h fcntl.h stdio.h stdlib.h unistd.h sys/uio.h])
 | 
				
			||||||
AC_CHECK_HEADERS([sys/select.h sys/socket.h sys/ioctl.h sys/time.h])
 | 
					AC_CHECK_HEADERS([sys/select.h sys/socket.h sys/ioctl.h sys/time.h])
 | 
				
			||||||
AC_CHECK_HEADERS([arpa/inet.h netinet/in.h])
 | 
					AC_CHECK_HEADERS([arpa/inet.h netinet/in.h])
 | 
				
			||||||
AC_CHECK_FUNCS(poll gettimeofday select)
 | 
					AC_CHECK_FUNCS(poll gettimeofday select strtoll)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AC_FUNC_ALLOCA
 | 
					AC_FUNC_ALLOCA
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
/* Copyright (c) 2004-2007, Sara Golemon <sarag@libssh2.org>
 | 
					/* Copyright (c) 2004-2008, Sara Golemon <sarag@libssh2.org>
 | 
				
			||||||
 * All rights reserved.
 | 
					 * All rights reserved.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Redistribution and use in source and binary forms,
 | 
					 * Redistribution and use in source and binary forms,
 | 
				
			||||||
@@ -811,7 +811,14 @@ struct _LIBSSH2_SESSION
 | 
				
			|||||||
    unsigned char scpRecv_response[LIBSSH2_SCP_RESPONSE_BUFLEN];
 | 
					    unsigned char scpRecv_response[LIBSSH2_SCP_RESPONSE_BUFLEN];
 | 
				
			||||||
    unsigned long scpRecv_response_len;
 | 
					    unsigned long scpRecv_response_len;
 | 
				
			||||||
    long scpRecv_mode;
 | 
					    long scpRecv_mode;
 | 
				
			||||||
 | 
					#if defined(HAVE_LONGLONG) && defined(strtoll)
 | 
				
			||||||
 | 
					    /* we have the type and we can parse such numbers */
 | 
				
			||||||
 | 
					    long long scpRecv_size;
 | 
				
			||||||
 | 
					#define scpsize_strtol strtoll
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
    long scpRecv_size;
 | 
					    long scpRecv_size;
 | 
				
			||||||
 | 
					#define scpsize_strtol strtol
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
    long scpRecv_mtime;
 | 
					    long scpRecv_mtime;
 | 
				
			||||||
    long scpRecv_atime;
 | 
					    long scpRecv_atime;
 | 
				
			||||||
    char *scpRecv_err_msg;
 | 
					    char *scpRecv_err_msg;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
/* Copyright (c) 2004-2007, Sara Golemon <sarag@libssh2.org>
 | 
					/* Copyright (c) 2004-2008, Sara Golemon <sarag@libssh2.org>
 | 
				
			||||||
 * All rights reserved.
 | 
					 * All rights reserved.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Redistribution and use in source and binary forms,
 | 
					 * Redistribution and use in source and binary forms,
 | 
				
			||||||
@@ -487,7 +487,7 @@ libssh2_scp_recv(LIBSSH2_SESSION * session, const char *path, struct stat * sb)
 | 
				
			|||||||
                *(s++) = '\0';
 | 
					                *(s++) = '\0';
 | 
				
			||||||
                /* Make sure we don't get fooled by leftover values */
 | 
					                /* Make sure we don't get fooled by leftover values */
 | 
				
			||||||
                errno = 0;
 | 
					                errno = 0;
 | 
				
			||||||
                session->scpRecv_size = strtol(p, &e, 10);
 | 
					                session->scpRecv_size = scpsize_strtol(p, &e, 10);
 | 
				
			||||||
                if ((e && *e) || errno) {
 | 
					                if ((e && *e) || errno) {
 | 
				
			||||||
                    libssh2_error(session, LIBSSH2_ERROR_SCP_PROTOCOL,
 | 
					                    libssh2_error(session, LIBSSH2_ERROR_SCP_PROTOCOL,
 | 
				
			||||||
                                  "Invalid response from SCP server, invalid size",
 | 
					                                  "Invalid response from SCP server, invalid size",
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user