Hello community, here is the log from the commit of package libssh for openSUSE:Factory checked in at Tue Jan 18 12:29:52 CET 2011. -------- --- libssh/libssh.changes 2010-09-05 21:05:50.000000000 +0200 +++ libssh/libssh.changes 2011-01-15 09:59:20.000000000 +0100 @@ -1,0 +2,24 @@ +Sat Jan 15 08:58:45 UTC 2011 - asn@cryptomilk.org + +- Update to version 0.4.8 + * Fixed memory leaks in session signing. + * Fixed memory leak in ssh_print_hexa. + * Fixed problem with ssh_connect w/ timeout and fd > 1024. + * Fixed some warnings on OS/2. + * Fixed installation path for OS/2. + +------------------------------------------------------------------- +Mon Dec 27 20:12:23 CET 2010 - asn@cynapses.org + +- Update to version 0.4.7 + * Fixed a possible memory leak in ssh_get_user_home(). + * Fixed a memory leak in sftp_xstat. + * Fixed uninitialized fd->revents member. + * Fixed timout value in ssh_channel_accept(). + * Fixed length checks in ssh_analyze_banner(). + * Fixed a possible data overread and crash bug. + * Fixed setting max_fd which breaks ssh_select(). + * Fixed some pedantic build warnings. + * Fixed a memory leak with session->bindaddr. + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- libssh-0.4.6.tar.bz2 New: ---- libssh-0.4.8.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libssh.spec ++++++ --- /var/tmp/diff_new_pack.9ydSrk/_old 2011-01-18 12:29:35.000000000 +0100 +++ /var/tmp/diff_new_pack.9ydSrk/_new 2011-01-18 12:29:35.000000000 +0100 @@ -1,7 +1,7 @@ # -# spec file for package libssh (Version 0.4.6) +# spec file for package libssh # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,7 +23,7 @@ BuildRequires: cmake doxygen openssl-devel License: LGPLv2.1+ Group: System/Libraries -Version: 0.4.6 +Version: 0.4.8 Release: 1 Summary: SSH library Source0: %{name}-%{version}.tar.bz2 ++++++ libssh-0.4.6.tar.bz2 -> libssh-0.4.8.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libssh-0.4.6/CMakeLists.txt new/libssh-0.4.8/CMakeLists.txt --- old/libssh-0.4.6/CMakeLists.txt 2010-09-05 19:29:26.000000000 +0200 +++ new/libssh-0.4.8/CMakeLists.txt 2011-01-15 09:56:14.000000000 +0100 @@ -8,7 +8,7 @@ set(APPLICATION_VERSION_MAJOR "0") set(APPLICATION_VERSION_MINOR "4") -set(APPLICATION_VERSION_PATCH "6") +set(APPLICATION_VERSION_PATCH "8") set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}") @@ -19,7 +19,7 @@ # Increment AGE. Set REVISION to 0 # If the source code was changed, but there were no interface changes: # Increment REVISION. -set(LIBRARY_VERSION "4.1.3") +set(LIBRARY_VERSION "4.1.4") set(LIBRARY_SOVERSION "4") # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked @@ -30,6 +30,7 @@ # add definitions include(DefineCMakeDefaults) include(DefineCompilerFlags) +include(DefinePlatformDefaults) include(DefineInstallationPaths) include(DefineOptions.cmake) include(CPackConfig.cmake) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libssh-0.4.6/CPackConfig.cmake new/libssh-0.4.8/CPackConfig.cmake --- old/libssh-0.4.6/CPackConfig.cmake 2010-09-05 19:29:26.000000000 +0200 +++ new/libssh-0.4.8/CPackConfig.cmake 2011-01-15 09:56:13.000000000 +0100 @@ -13,7 +13,7 @@ ### versions set(CPACK_PACKAGE_VERSION_MAJOR "0") set(CPACK_PACKAGE_VERSION_MINOR "4") -set(CPACK_PACKAGE_VERSION_PATCH "6") +set(CPACK_PACKAGE_VERSION_PATCH "8") set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libssh-0.4.6/ChangeLog new/libssh-0.4.8/ChangeLog --- old/libssh-0.4.6/ChangeLog 2010-09-05 19:29:26.000000000 +0200 +++ new/libssh-0.4.8/ChangeLog 2011-01-15 09:56:13.000000000 +0100 @@ -1,6 +1,24 @@ ChangeLog ========== +version 0.4.8 (released 2011-01-15) + * Fixed memory leaks in session signing. + * Fixed memory leak in ssh_print_hexa. + * Fixed problem with ssh_connect w/ timeout and fd > 1024. + * Fixed some warnings on OS/2. + * Fixed installation path for OS/2. + +version 0.4.7 (released 2010-12-28) + * Fixed a possible memory leak in ssh_get_user_home(). + * Fixed a memory leak in sftp_xstat. + * Fixed uninitialized fd->revents member. + * Fixed timout value in ssh_channel_accept(). + * Fixed length checks in ssh_analyze_banner(). + * Fixed a possible data overread and crash bug. + * Fixed setting max_fd which breaks ssh_select(). + * Fixed some pedantic build warnings. + * Fixed a memory leak with session->bindaddr. + version 0.4.6 (released 2010-09-03) * Added a cleanup function to free the ws2_32 library. * Fixed build with gcc 3.4. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libssh-0.4.6/ConfigureChecks.cmake new/libssh-0.4.8/ConfigureChecks.cmake --- old/libssh-0.4.6/ConfigureChecks.cmake 2010-09-05 19:29:26.000000000 +0200 +++ new/libssh-0.4.8/ConfigureChecks.cmake 2011-01-15 09:56:14.000000000 +0100 @@ -25,17 +25,17 @@ ) string(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2" - _COMPILER_VERSION ${_COMPILER_VERSION}) + _COMPILER_VERSION "${_COMPILER_VERSION}") set(${_OUTPUT_VERSION} ${_COMPILER_VERSION} PARENT_SCOPE) endfunction() -if(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW) +if(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW AND NOT OS2) compiler_dumpversion(GNUCC_VERSION) if (NOT GNUCC_VERSION EQUAL 34) check_c_compiler_flag("-fvisibility=hidden" WITH_VISIBILITY_HIDDEN) endif (NOT GNUCC_VERSION EQUAL 34) -endif(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW) +endif(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW AND NOT OS2) # HEADER FILES check_include_file(argp.h HAVE_ARGP_H) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libssh-0.4.6/cmake/Modules/DefineInstallationPaths.cmake new/libssh-0.4.8/cmake/Modules/DefineInstallationPaths.cmake --- old/libssh-0.4.6/cmake/Modules/DefineInstallationPaths.cmake 2010-09-05 19:29:26.000000000 +0200 +++ new/libssh-0.4.8/cmake/Modules/DefineInstallationPaths.cmake 2011-01-15 09:56:14.000000000 +0100 @@ -1,4 +1,15 @@ -if (UNIX) +if (WIN32) + # Same same + set(BIN_INSTALL_DIR "bin" CACHE PATH "-") + set(SBIN_INSTALL_DIR "." CACHE PATH "-") + set(LIB_INSTALL_DIR "lib" CACHE PATH "-") + set(INCLUDE_INSTALL_DIR "include" CACHE PATH "-") + set(PLUGIN_INSTALL_DIR "plugins" CACHE PATH "-") + set(HTML_INSTALL_DIR "doc/HTML" CACHE PATH "-") + set(ICON_INSTALL_DIR "." CACHE PATH "-") + set(SOUND_INSTALL_DIR "." CACHE PATH "-") + set(LOCALE_INSTALL_DIR "lang" CACHE PATH "-") +elseif (UNIX OR OS2) IF (NOT APPLICATION_NAME) MESSAGE(STATUS "${PROJECT_NAME} is used as APPLICATION_NAME") SET(APPLICATION_NAME ${PROJECT_NAME}) @@ -90,18 +101,4 @@ "${SHARE_INSTALL_PREFIX}/info" CACHE PATH "The ${APPLICATION_NAME} info install dir (default prefix/info)" ) -endif (UNIX) - -if (WIN32) - # Same same - set(BIN_INSTALL_DIR "bin" CACHE PATH "-") - set(SBIN_INSTALL_DIR "." CACHE PATH "-") - set(LIB_INSTALL_DIR "lib" CACHE PATH "-") - set(INCLUDE_INSTALL_DIR "include" CACHE PATH "-") - set(PLUGIN_INSTALL_DIR "plugins" CACHE PATH "-") - set(HTML_INSTALL_DIR "doc/HTML" CACHE PATH "-") - set(ICON_INSTALL_DIR "." CACHE PATH "-") - set(SOUND_INSTALL_DIR "." CACHE PATH "-") - set(LOCALE_INSTALL_DIR "lang" CACHE PATH "-") -endif (WIN32) - +endif () diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libssh-0.4.6/cmake/Modules/DefinePlatformDefaults.cmake new/libssh-0.4.8/cmake/Modules/DefinePlatformDefaults.cmake --- old/libssh-0.4.6/cmake/Modules/DefinePlatformDefaults.cmake 1970-01-01 01:00:00.000000000 +0100 +++ new/libssh-0.4.8/cmake/Modules/DefinePlatformDefaults.cmake 2011-01-15 09:56:14.000000000 +0100 @@ -0,0 +1,25 @@ +# Set system vars + +if (CMAKE_SYSTEM_NAME MATCHES "Linux") + set(LINUX TRUE) +endif(CMAKE_SYSTEM_NAME MATCHES "Linux") + +if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + set(FREEBSD TRUE) +endif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + +if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD") + set(OPENBSD TRUE) +endif (CMAKE_SYSTEM_NAME MATCHES "OpenBSD") + +if (CMAKE_SYSTEM_NAME MATCHES "NetBSD") + set(NETBSD TRUE) +endif (CMAKE_SYSTEM_NAME MATCHES "NetBSD") + +if (CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)") + set(SOLARIS TRUE) +endif (CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)") + +if (CMAKE_SYSTEM_NAME MATCHES "OS2") + set(OS2 TRUE) +endif (CMAKE_SYSTEM_NAME MATCHES "OS2") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libssh-0.4.6/cmake/Modules/FindOpenSSL.cmake new/libssh-0.4.8/cmake/Modules/FindOpenSSL.cmake --- old/libssh-0.4.6/cmake/Modules/FindOpenSSL.cmake 2010-09-05 19:29:26.000000000 +0200 +++ new/libssh-0.4.8/cmake/Modules/FindOpenSSL.cmake 2011-01-15 09:56:14.000000000 +0100 @@ -52,6 +52,7 @@ find_library(SSL_LIBRARY NAMES ssl + ssl_dl libssl PATHS ${_OPENSSL_DIR}/lib @@ -101,6 +102,7 @@ find_library(CRYPTO_LIBRARY NAMES crypto + crypto_dl libcrypto eay eay32 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libssh-0.4.6/include/libssh/libssh.h new/libssh-0.4.8/include/libssh/libssh.h --- old/libssh-0.4.6/include/libssh/libssh.h 2010-09-05 19:29:26.000000000 +0200 +++ new/libssh-0.4.8/include/libssh/libssh.h 2011-01-15 09:56:14.000000000 +0100 @@ -40,7 +40,7 @@ #endif #endif #else - #if __GNUC__ >= 4 + #if __GNUC__ >= 4 && !defined(__OS2__) #define LIBSSH_API __attribute__((visibility("default"))) #else #define LIBSSH_API @@ -79,7 +79,7 @@ /* libssh version */ #define LIBSSH_VERSION_MAJOR 0 #define LIBSSH_VERSION_MINOR 4 -#define LIBSSH_VERSION_MICRO 6 +#define LIBSSH_VERSION_MICRO 8 #define LIBSSH_VERSION_INT SSH_VERSION_INT(LIBSSH_VERSION_MAJOR, \ LIBSSH_VERSION_MINOR, \ @@ -171,7 +171,7 @@ SSH_REQUEST_CHANNEL_OPEN, SSH_REQUEST_CHANNEL, SSH_REQUEST_SERVICE, - SSH_REQUEST_GLOBAL, + SSH_REQUEST_GLOBAL }; enum ssh_channel_type_e { @@ -189,7 +189,7 @@ SSH_CHANNEL_REQUEST_SHELL, SSH_CHANNEL_REQUEST_ENV, SSH_CHANNEL_REQUEST_SUBSYSTEM, - SSH_CHANNEL_REQUEST_WINDOW_CHANGE, + SSH_CHANNEL_REQUEST_WINDOW_CHANGE }; /* status flags */ @@ -203,7 +203,7 @@ SSH_SERVER_KNOWN_OK, SSH_SERVER_KNOWN_CHANGED, SSH_SERVER_FOUND_OTHER, - SSH_SERVER_FILE_NOT_FOUND, + SSH_SERVER_FILE_NOT_FOUND }; #ifndef MD5_DIGEST_LEN diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libssh-0.4.6/libssh/channels.c new/libssh-0.4.8/libssh/channels.c --- old/libssh-0.4.6/libssh/channels.c 2010-09-05 19:29:26.000000000 +0200 +++ new/libssh-0.4.8/libssh/channels.c 2011-01-15 09:56:14.000000000 +0100 @@ -1392,11 +1392,13 @@ iterator = iterator->next; } } + if(t>0){ #ifdef _WIN32 - Sleep(50); /* 50ms */ + Sleep(50); /* 50ms */ #else - nanosleep(&ts, NULL); + nanosleep(&ts, NULL); #endif + } } return NULL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libssh-0.4.6/libssh/client.c new/libssh-0.4.8/libssh/client.c --- old/libssh-0.4.6/libssh/client.c 2010-09-05 19:29:26.000000000 +0200 +++ new/libssh-0.4.8/libssh/client.c 2011-01-15 09:56:14.000000000 +0100 @@ -110,26 +110,37 @@ const char *banner = session->serverbanner; const char *openssh; - ssh_log(session, SSH_LOG_RARE, "Analyzing banner: %s", banner); - - if (strncmp(banner, "SSH-", 4) != 0) { - ssh_set_error(session, SSH_FATAL, "Protocol mismatch: %s", banner); - return -1; + if (banner == NULL) { + ssh_set_error(session, SSH_FATAL, "Invalid banner"); + return -1; } /* * Typical banners e.g. are: - * SSH-1.5-blah - * SSH-1.99-blah - * SSH-2.0-blah + * + * SSH-1.5-openSSH_5.4 + * SSH-1.99-openSSH_3.0 + * + * SSH-2.0-something + * 012345678901234567890 */ + if (strlen(banner) < 6 || + strncmp(banner, "SSH-", 4) != 0) { + ssh_set_error(session, SSH_FATAL, "Protocol mismatch: %s", banner); + return -1; + } + + ssh_log(session, SSH_LOG_RARE, "Analyzing banner: %s", banner); + switch(banner[4]) { case '1': *ssh1 = 1; - if (banner[6] == '9') { - *ssh2 = 1; - } else { - *ssh2 = 0; + if (strlen(banner) > 6) { + if (banner[6] == '9') { + *ssh2 = 1; + } else { + *ssh2 = 0; + } } break; case '2': @@ -143,13 +154,21 @@ openssh = strstr(banner, "OpenSSH"); if (openssh != NULL) { - int major, minor; - major = strtol(openssh + 8, (char **) NULL, 10); - minor = strtol(openssh + 10, (char **) NULL, 10); - session->openssh = SSH_VERSION_INT(major, minor, 0); - ssh_log(session, SSH_LOG_RARE, - "We are talking to an OpenSSH server version: %d.%d (%x)", - major, minor, session->openssh); + int major, minor; + + /* + * The banner is typical: + * OpenSSH_5.4 + * 012345678901234567890 + */ + if (strlen(openssh) > 9) { + major = strtol(openssh + 8, (char **) NULL, 10); + minor = strtol(openssh + 10, (char **) NULL, 10); + session->openssh = SSH_VERSION_INT(major, minor, 0); + ssh_log(session, SSH_LOG_RARE, + "We are talking to an OpenSSH client version: %d.%d (%x)", + major, minor, session->openssh); + } } return 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libssh-0.4.6/libssh/connect.c new/libssh-0.4.8/libssh/connect.c --- old/libssh-0.4.6/libssh/connect.c 2010-09-05 19:29:26.000000000 +0200 +++ new/libssh-0.4.8/libssh/connect.c 2011-01-15 09:56:14.000000000 +0100 @@ -67,10 +67,7 @@ #include "libssh/socket.h" #include "libssh/channels.h" #include "libssh/session.h" - -#ifndef HAVE_SELECT -#error "Your system must have select()" -#endif +#include "libssh/poll.h" #ifndef HAVE_GETADDRINFO #error "Your system must have getaddrinfo()" @@ -202,29 +199,35 @@ static int ssh_connect_ai_timeout(ssh_session session, const char *host, int port, struct addrinfo *ai, long timeout, long usec, socket_t s) { - struct timeval to; - fd_set set; + int timeout_ms; + ssh_pollfd_t fds; int rc = 0; unsigned int len = sizeof(rc); enter_function(); - to.tv_sec = timeout; - to.tv_usec = usec; + /* I know we're losing some precision. But it's not like poll-like family + * type of mechanisms are precise up to the microsecond. + */ + timeout_ms=timeout * 1000 + usec / 1000; sock_set_nonblocking(s); ssh_log(session, SSH_LOG_RARE, "Trying to connect to host: %s:%d with " - "timeout %ld.%ld", host, port, timeout, usec); + "timeout %d ms", host, port, timeout_ms); /* The return value is checked later */ connect(s, ai->ai_addr, ai->ai_addrlen); freeaddrinfo(ai); - FD_ZERO(&set); - FD_SET(s, &set); + fds.fd=s; + fds.revents=0; + fds.events=POLLOUT; +#ifdef _WIN32 + fds.events |= POLLWRNORM; +#endif + rc = ssh_poll(&fds,1,timeout_ms); - rc = select(s + 1, NULL, &set, NULL, &to); if (rc == 0) { /* timeout */ ssh_set_error(session, SSH_FATAL, @@ -236,7 +239,7 @@ if (rc < 0) { ssh_set_error(session, SSH_FATAL, - "Select error: %s", strerror(errno)); + "poll error: %s", strerror(errno)); ssh_connect_socket_close(s); leave_function(); return -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libssh-0.4.6/libssh/dh.c new/libssh-0.4.8/libssh/dh.c --- old/libssh-0.4.6/libssh/dh.c 2010-09-05 19:29:26.000000000 +0200 +++ new/libssh-0.4.8/libssh/dh.c 2011-01-15 09:56:14.000000000 +0100 @@ -222,6 +222,8 @@ return; } printf("%s: %s\n", descr, hexa); + + free(hexa); } int dh_generate_x(ssh_session session) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libssh-0.4.6/libssh/keys.c new/libssh-0.4.8/libssh/keys.c --- old/libssh-0.4.6/libssh/keys.c 2010-09-05 19:29:26.000000000 +0200 +++ new/libssh-0.4.8/libssh/keys.c 2011-01-15 09:56:14.000000000 +0100 @@ -1308,6 +1308,9 @@ #endif sign->dsa_sign = NULL; break; + default: + signature_free(sign); + return NULL; } #ifdef HAVE_LIBGCRYPT gcry_sexp_release(gcryhash); @@ -1463,6 +1466,9 @@ #endif sign->dsa_sign = NULL; break; + default: + signature_free(sign); + return NULL; } #ifdef HAVE_LIBGCRYPT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libssh-0.4.6/libssh/misc.c new/libssh-0.4.8/libssh/misc.c --- old/libssh-0.4.6/libssh/misc.c 2010-09-05 19:29:26.000000000 +0200 +++ new/libssh-0.4.8/libssh/misc.c 2011-01-15 09:56:14.000000000 +0100 @@ -504,7 +504,7 @@ * @return The expanded directory, NULL on error. */ char *ssh_path_expand_tilde(const char *d) { - char *h, *r; + char *h = NULL, *r; const char *p; size_t ld; size_t lh = 0; @@ -548,12 +548,14 @@ r = malloc(ld + lh + 1); if (r == NULL) { + SAFE_FREE(h); return NULL; } if (lh > 0) { memcpy(r, h, lh); } + SAFE_FREE(h); memcpy(r + lh, p, ld + 1); return r; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libssh-0.4.6/libssh/server.c new/libssh-0.4.8/libssh/server.c --- old/libssh-0.4.6/libssh/server.c 2010-09-05 19:29:26.000000000 +0200 +++ new/libssh-0.4.8/libssh/server.c 2011-01-15 09:56:14.000000000 +0100 @@ -246,6 +246,7 @@ if (sshbind->bindaddr == NULL) session->bindaddr = NULL; else { + SAFE_FREE(session->bindaddr); session->bindaddr = strdup(sshbind->bindaddr); if (session->bindaddr == NULL) { privatekey_free(dsa); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libssh-0.4.6/libssh/session.c new/libssh-0.4.8/libssh/session.c --- old/libssh-0.4.6/libssh/session.c 2010-09-05 19:29:26.000000000 +0200 +++ new/libssh-0.4.8/libssh/session.c 2011-01-15 09:56:14.000000000 +0100 @@ -153,6 +153,7 @@ SAFE_FREE(session->serverbanner); SAFE_FREE(session->clientbanner); + SAFE_FREE(session->bindaddr); SAFE_FREE(session->banner); #ifdef WITH_PCAP if(session->pcap_ctx){ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libssh-0.4.6/libssh/sftp.c new/libssh-0.4.8/libssh/sftp.c --- old/libssh-0.4.6/libssh/sftp.c 2010-09-05 19:29:26.000000000 +0200 +++ new/libssh-0.4.8/libssh/sftp.c 2011-01-15 09:56:14.000000000 +0100 @@ -3123,7 +3123,10 @@ } if (msg->packet_type == SSH_FXP_ATTRS) { - return sftp_parse_attr(sftp, msg->payload, 0); + sftp_attributes attr = sftp_parse_attr(sftp, msg->payload, 0); + sftp_message_free(msg); + + return attr; } else if (msg->packet_type == SSH_FXP_STATUS) { status = parse_status_msg(msg); sftp_message_free(msg); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libssh-0.4.6/libssh/socket.c new/libssh-0.4.8/libssh/socket.c --- old/libssh-0.4.6/libssh/socket.c 2010-09-05 19:29:26.000000000 +0200 +++ new/libssh-0.4.8/libssh/socket.c 2011-01-15 09:56:14.000000000 +0100 @@ -265,7 +265,10 @@ if (s->fd == SSH_INVALID_SOCKET) return; FD_SET(s->fd,set); - if (s->fd >= 0 && s->fd != SSH_INVALID_SOCKET) { + + if (s->fd >= 0 && + s->fd >= *max_fd && + s->fd != SSH_INVALID_SOCKET) { *max_fd = s->fd + 1; } } @@ -489,6 +492,7 @@ fd->fd = s->fd; fd->events = 0; + fd->revents = 0; if (!s->data_to_read) { fd->events |= POLLIN; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org