head 1.24; access; symbols OPENPKG_2_STABLE_MP:1.10 OPENPKG_E1_MP_HEAD:1.10 OPENPKG_E1_MP:1.10 OPENPKG_E1_MP_2_STABLE:1.10 OPENPKG_E1_FP:1.10 OPENPKG_2_STABLE_20061018:1.10 OPENPKG_2_STABLE:1.10.0.6 OPENPKG_2_STABLE_BP:1.10 OPENPKG_2_5_SOLID:1.10.0.4 OPENPKG_2_5_SOLID_BP:1.10 OPENPKG_2_4_RELEASE:1.10 OPENPKG_2_4_SOLID:1.10.0.2 OPENPKG_2_4_SOLID_BP:1.10 OPENPKG_2_3_RELEASE:1.8.2.2 OPENPKG_2_3_SOLID:1.8.0.2 OPENPKG_2_3_SOLID_BP:1.8 OPENPKG_2_2_RELEASE:1.6 OPENPKG_2_2_SOLID:1.6.0.6 OPENPKG_2_2_SOLID_BP:1.6 OPENPKG_2_1_RELEASE:1.6 OPENPKG_2_1_SOLID:1.6.0.4 OPENPKG_2_1_SOLID_BP:1.6 OPENPKG_2_0_RELEASE:1.6 OPENPKG_2_0_SOLID:1.6.0.2 OPENPKG_2_0_SOLID_BP:1.6 OPENPKG_1_3_RELEASE:1.3.2.1 OPENPKG_1_3_SOLID:1.3.2.1.0.2 OPENPKG_1_3_SOLID_BP:1.3.2.1 OPENPKG_1_2_RELEASE:1.3 OPENPKG_1_2_SOLID:1.3.0.4 OPENPKG_1_2_SOLID_BP:1.3 OPENPKG_1_STABLE:1.3.0.2 OPENPKG_1_STABLE_BP:1.3; locks; strict; comment @# @; expand @o@; 1.24 date 2009.11.04.16.54.12; author rse; state Exp; branches; next 1.23; commitid aQXWjxxSRQwfRdau; 1.23 date 2009.08.12.18.16.07; author rse; state Exp; branches; next 1.22; commitid GtqdMRlaKERK0rZt; 1.22 date 2009.05.18.20.47.34; author rse; state Exp; branches; next 1.21; commitid nrC5jvmktOr6CoOt; 1.21 date 2009.04.10.08.36.54; author rse; state Exp; branches; next 1.20; commitid 0VZClZbwFucaNrJt; 1.20 date 2009.03.07.09.21.47; author rse; state Exp; branches; next 1.19; commitid 66J82xABUlEk85Ft; 1.19 date 2009.01.19.19.27.08; author rse; state Exp; branches; next 1.18; commitid QVrM429PiVtFZ5zt; 1.18 date 2008.11.13.19.14.08; author rse; state Exp; branches; next 1.17; commitid D7kjjNIbvpJJ4uqt; 1.17 date 2008.06.07.18.59.05; author rse; state Exp; branches; next 1.16; commitid BI0Um2r4Fner636t; 1.16 date 2008.03.30.18.54.02; author rse; state Exp; branches; next 1.15; commitid UoGBf1yD46jdibXs; 1.15 date 2008.01.29.13.35.53; author rse; state Exp; branches; next 1.14; commitid WO7144F1N2cDujPs; 1.14 date 2007.09.14.17.45.17; author rse; state Exp; branches; next 1.13; commitid 9sMT0ssYh98dhJxs; 1.13 date 2007.09.14.06.00.34; author rse; state dead; branches; next 1.12; commitid 8BjYCWLNaYZqnFxs; 1.12 date 2007.08.29.08.10.52; author rse; state Exp; branches; next 1.11; commitid 73TpewsIDpS2CCvs; 1.11 date 2007.07.20.07.24.18; author rse; state Exp; branches; next 1.10; commitid pxir0MuonQcNDtqs; 1.10 date 2005.03.04.17.00.25; author rse; state dead; branches 1.10.2.1 1.10.4.1; next 1.9; 1.9 date 2005.02.23.14.15.05; author rse; state Exp; branches; next 1.8; 1.8 date 2005.02.01.18.47.16; author rse; state dead; branches 1.8.2.1; next 1.7; 1.7 date 2005.01.20.12.52.35; author ms; state Exp; branches; next 1.6; 1.6 date 2003.04.03.12.25.52; author rse; state dead; branches; next 1.5; 1.5 date 2003.02.13.16.18.00; author rse; state Exp; branches; next 1.4; 1.4 date 2003.02.13.15.51.05; author rse; state Exp; branches; next 1.3; 1.3 date 2002.12.31.10.00.40; author rse; state Exp; branches 1.3.2.1; next 1.2; 1.2 date 2002.06.14.09.46.42; author rse; state dead; branches; next 1.1; 1.1 date 2002.05.14.16.33.21; author rse; state Exp; branches; next ; 1.10.2.1 date 2005.10.18.08.27.40; author rse; state Exp; branches; next 1.10.2.2; 1.10.2.2 date 2005.12.10.19.35.43; author rse; state Exp; branches; next ; commitid 0uTPwxKdk4Mxy6dr; 1.10.4.1 date 2005.12.10.19.33.10; author rse; state Exp; branches; next ; commitid SlLfGsrdnbVEx6dr; 1.8.2.1 date 2005.02.23.14.15.52; author rse; state Exp; branches; next 1.8.2.2; 1.8.2.2 date 2005.02.23.14.25.55; author rse; state Exp; branches; next 1.8.2.3; 1.8.2.3 date 2005.10.18.08.30.23; author rse; state Exp; branches; next 1.8.2.4; 1.8.2.4 date 2005.12.10.19.38.02; author rse; state Exp; branches; next ; commitid 6AQDLUKIxkwlz6dr; 1.3.2.1 date 2003.07.24.20.43.58; author rse; state dead; branches; next ; desc @@ 1.24 log @upgrading package: curl 7.19.6 -> 7.19.7 @ text @Index: configure --- configure.orig 2009-11-04 13:26:02 +0100 +++ configure 2009-11-04 17:50:44 +0100 @@@@ -4809,10 +4809,7 @@@@ if $ac_preproc_ok; then : else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } + : fi ac_ext=c @@@@ -17785,7 +17782,7 @@@@ $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-l"$LDAPLIBNAME" $LIBS" +LIBS="-l$LDAPLIBNAME $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@@@ -17819,7 +17816,7 @@@@ #define `$as_echo "HAVE_LIB"$LDAPLIBNAME"" | $as_tr_cpp` 1 _ACEOF - LIBS="-l"$LDAPLIBNAME" $LIBS" + LIBS="-l$LDAPLIBNAME $LIBS" else @@@@ -17967,7 +17964,7 @@@@ $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-l"$LBERLIBNAME" $LIBS" +LIBS="-l$LBERLIBNAME $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@@@ -18001,7 +17998,7 @@@@ #define `$as_echo "HAVE_LIB"$LBERLIBNAME"" | $as_tr_cpp` 1 _ACEOF - LIBS="-l"$LBERLIBNAME" $LIBS" + LIBS="-l$LBERLIBNAME $LIBS" else @ 1.23 log @regen patch @ text @d2 5 a6 5 --- configure.orig 2009-07-22 22:11:25 +0200 +++ configure 2009-08-12 20:13:56 +0200 @@@@ -4764,13 +4764,7 @@@@ if $ac_preproc_ok; then : d8 1 a8 1 - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 d10 3 a12 6 -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + : d16 1 a16 1 @@@@ -21824,7 +21818,7 @@@@ d21 5 a25 5 +LIBS="-l$LDAPLIBNAME $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@@@ -21889,7 +21883,7 @@@@ d34 1 a34 1 @@@@ -22077,7 +22071,7 @@@@ d39 5 a43 5 +LIBS="-l$LBERLIBNAME $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@@@ -22142,7 +22136,7 @@@@ @ 1.22 log @upgrading package: curl 7.19.4 -> 7.19.5 @ text @d2 3 a4 3 --- configure.orig 2009-05-16 23:09:34 +0200 +++ configure 2009-05-18 22:44:29 +0200 @@@@ -4724,13 +4724,7 @@@@ d19 1 a19 1 @@@@ -21518,7 +21512,7 @@@@ d28 1 a28 1 @@@@ -21583,7 +21577,7 @@@@ d37 1 a37 1 @@@@ -21771,7 +21765,7 @@@@ d46 1 a46 1 @@@@ -21836,7 +21830,7 @@@@ @ 1.21 log @fix configure script once again: this time to fix building with SSL support @ text @d2 19 a20 4 --- configure.orig 2009-02-13 15:25:53 +0100 +++ configure 2009-04-10 10:32:44 +0200 @@@@ -21303,7 +21303,7 @@@@ echo $ECHO_N "(cached) $ECHO_C" >&6 d28 2 a29 2 @@@@ -21361,7 +21361,7 @@@@ #define `echo "HAVE_LIB"$LDAPLIBNAME"" | $as_tr_cpp` 1 d37 2 a38 2 @@@@ -21545,7 +21545,7 @@@@ echo $ECHO_N "(cached) $ECHO_C" >&6 d46 2 a47 2 @@@@ -21603,7 +21603,7 @@@@ #define `echo "HAVE_LIB"$LBERLIBNAME"" | $as_tr_cpp` 1 a54 9 @@@@ -23435,7 +23435,7 @@@@ PKGTEST="no" PREFIX_OPENSSL=$OPT_SSL LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff" - if "$PREFIX_OPENSSL" != "/usr" ; then + if test "$PREFIX_OPENSSL" != "/usr"; then LDFLAGS="$LDFLAGS -L$LIB_OPENSSL" CPPFLAGS="$CPPFLAGS -I$PREFIX_OPENSSL/include" fi @ 1.20 log @regen patch @ text @d3 1 a3 1 +++ configure 2009-03-07 10:18:36 +0100 d40 9 @ 1.19 log @modifying package: curl-7.19.3 20090119 again @ text @d2 2 a3 2 --- configure.orig 2009-01-13 13:05:10 +0100 +++ configure 2009-01-19 20:25:16 +0100 @ 1.18 log @regen patch @ text @d2 3 a4 3 --- configure.orig 2008-11-10 16:23:17 +0100 +++ configure 2008-11-13 20:12:21 +0100 @@@@ -29358,7 +29358,7 @@@@ d13 1 a13 1 @@@@ -29419,7 +29419,7 @@@@ d22 1 a22 1 @@@@ -29604,7 +29604,7 @@@@ d31 1 a31 1 @@@@ -29665,7 +29665,7 @@@@ @ 1.17 log @upgrading package: curl 7.18.1 -> 7.18.2 @ text @d2 3 a4 3 --- configure.orig 2008-05-26 17:16:45 +0200 +++ configure 2008-06-07 20:58:07 +0200 @@@@ -23751,7 +23751,7 @@@@ d13 1 a13 1 @@@@ -23812,7 +23812,7 @@@@ d22 1 a22 1 @@@@ -23996,7 +23996,7 @@@@ d31 1 a31 1 @@@@ -24057,7 +24057,7 @@@@ @ 1.16 log @regen patch @ text @d2 3 a4 3 --- configure.orig 2008-03-28 00:14:13 +0100 +++ configure 2008-03-30 20:53:04 +0200 @@@@ -23137,7 +23137,7 @@@@ d13 1 a13 1 @@@@ -23198,7 +23198,7 @@@@ d22 1 a22 1 @@@@ -23382,7 +23382,7 @@@@ d31 1 a31 1 @@@@ -23443,7 +23443,7 @@@@ @ 1.15 log @remove offsets to apply without fuzz factor @ text @d2 3 a4 3 --- configure.orig 2008-01-28 12:59:49 +0100 +++ configure 2008-01-29 14:33:55 +0100 @@@@ -22746,7 +22746,7 @@@@ d13 1 a13 1 @@@@ -22807,7 +22807,7 @@@@ d22 1 a22 1 @@@@ -22977,7 +22977,7 @@@@ d31 1 a31 1 @@@@ -23038,7 +23038,7 @@@@ @ 1.14 log @add optional LDAP[S] support not that cURL supports regular linking against OpenLDAP @ text @d2 3 a4 3 --- configure.orig 2007-09-14 19:17:04 +0200 +++ configure 2007-09-14 19:21:28 +0200 @@@@ -22009,7 +22009,7 @@@@ d13 1 a13 1 @@@@ -22070,7 +22070,7 @@@@ d22 1 a22 1 @@@@ -22195,7 +22195,7 @@@@ d31 1 a31 1 @@@@ -22256,7 +22256,7 @@@@ @ 1.13 log @upgrading package: curl 7.16.4 -> 7.17.0 @ text @d1 33 a33 6 Index: lib/ftp.c --- lib/ftp.c.orig 2007-07-02 00:01:19 +0200 +++ lib/ftp.c 2007-08-29 10:07:14 +0200 @@@@ -2371,8 +2371,7 @@@@ struct ftp_conn *ftpc = &conn->proto.ftpc; (void)instate; /* no use for this yet */ d35 2 a36 12 - /* some need password anyway, and others just return 2xx ignored */ - if((ftpcode == 331 || ftpcode/100 == 2) && (ftpc->state == FTP_USER)) { + if((ftpcode == 331) && (ftpc->state == FTP_USER)) { /* 331 Password required for ... (the server requires to send the user's password too) */ NBFTPSENDF(conn, "PASS %s", ftp->passwd?ftp->passwd:""); Index: lib/ssh.c --- lib/ssh.c.orig 2007-07-06 22:13:24 +0200 +++ lib/ssh.c 2007-08-29 10:07:14 +0200 @@@@ -70,6 +70,24 @@@@ #endif #endif /* !WIN32 */ d38 1 a38 24 +#if defined(LIBSSH2_VERSION_NUM) +# if LIBSSH2_VERSION_NUM >= 0x001000 +# define HAVE_LIBSSH2_NBLOCK 1 +# else +# define HAVE_LIBSSH2_NBLOCK 0 +# endif +#else /* !defined(LIBSSH2_VERSION_NUM) */ +# if defined(LIBSSH2_APINO) +# if LIBSSH2_APINO >= 200706012030 +# define HAVE_LIBSSH2_NBLOCK 1 +# else +# define HAVE_LIBSSH2_NBLOCK 0 +# endif +# else /* !defined(LIBSSH2_APINO) */ +# define HAVE_LIBSSH2_NBLOCK 0 +# endif /* defined(LIBSSH2_APINO) */ +#endif /* defined(LIBSSH2_VERSION_NUM) */ + #if (defined(NETWARE) && defined(__NOVELL_LIBC__)) #undef in_addr_t #define in_addr_t unsigned long @@@@ -239,7 +257,7 @@@@ (void)abstract; } a39 292 -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK /* * SSH State machine related code */ @@@@ -854,7 +872,7 @@@@ infof(data, "SSH socket: %d\n", sock); #endif /* CURL_LIBSSH2_DEBUG */ -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK state(conn, SSH_S_STARTUP); if (data->state.used_interface == Curl_if_multi) @@@@ -1134,7 +1152,7 @@@@ * the destination file will be named the same name as the last directory * in the path. */ -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK do { scp->ssh_channel = libssh2_scp_send_ex(scp->ssh_session, scp->path, conn->data->set.new_file_perms, @@@@ -1169,7 +1187,7 @@@@ */ curl_off_t bytecount; memset(&sb, 0, sizeof(struct stat)); -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK do { scp->ssh_channel = libssh2_scp_recv(scp->ssh_session, scp->path, &sb); if (!scp->ssh_channel && @@@@ -1217,7 +1235,7 @@@@ scp->path = NULL; if (scp->ssh_channel) { -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK if (conn->data->set.upload) { while ((rc = libssh2_channel_send_eof(scp->ssh_channel)) == LIBSSH2_ERROR_EAGAIN); @@@@ -1248,7 +1266,7 @@@@ } if (scp->ssh_session) { -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK while (libssh2_session_disconnect(scp->ssh_session, "Shutdown") == LIBSSH2_ERROR_EAGAIN); #else /* !(LIBSSH2_APINO >= 200706012030) */ @@@@ -1279,7 +1297,7 @@@@ * NOTE: we should not store nor rely on connection-related data to be * in the SessionHandle struct */ -#if defined(LIBSSH2CHANNEL_EAGAIN) && (LIBSSH2_APINO < 200706012030) +#if defined(LIBSSH2CHANNEL_EAGAIN) && defined(LIBSSH2_APINO) && (LIBSSH2_APINO < 200706012030) nwrite = (ssize_t) libssh2_channel_writenb(conn->data->reqdata.proto.ssh->ssh_channel, mem, len); @@@@ -1287,7 +1305,7 @@@@ nwrite = (ssize_t) libssh2_channel_write(conn->data->reqdata.proto.ssh->ssh_channel, mem, len); -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK if (nwrite == LIBSSH2_ERROR_EAGAIN) { return 0; } @@@@ -1313,7 +1331,7 @@@@ * in the SessionHandle struct */ -#if defined(LIBSSH2CHANNEL_EAGAIN) && (LIBSSH2_APINO < 200706012030) +#if defined(LIBSSH2CHANNEL_EAGAIN) && defined(LIBSSH2_APINO) && (LIBSSH2_APINO < 200706012030) /* we prefer the non-blocking API but that didn't exist previously */ nread = (ssize_t) libssh2_channel_readnb(conn->data->reqdata.proto.ssh->ssh_channel, @@@@ -1358,7 +1376,7 @@@@ * If this is not done the destination file will be named the * same name as the last directory in the path. */ -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK do { sftp->sftp_handle = libssh2_sftp_open(sftp->sftp_session, sftp->path, @@@@ -1446,7 +1464,7 @@@@ int len, totalLen, currLen; char *line; -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK do { sftp->sftp_handle = libssh2_sftp_opendir(sftp->sftp_session, sftp->path); @@@@ -1471,7 +1489,7 @@@@ #endif /* !(LIBSSH2_APINO >= 200706012030) */ do { -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK while ((len = libssh2_sftp_readdir(sftp->sftp_handle, filename, PATH_MAX, &attrs)) == LIBSSH2_ERROR_EAGAIN); @@@@ -1589,7 +1607,7 @@@@ char linkPath[PATH_MAX + 1]; snprintf(linkPath, PATH_MAX, "%s%s", sftp->path, filename); -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK while ((len = libssh2_sftp_readlink(sftp->sftp_session, linkPath, filename, PATH_MAX)) == LIBSSH2_ERROR_EAGAIN); @@@@ -1614,7 +1632,7 @@@@ break; } } while (1); -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK while (libssh2_sftp_closedir(sftp->sftp_handle) == LIBSSH2_ERROR_EAGAIN); #else /* !(LIBSSH2_APINO >= 200706012030) */ libssh2_sftp_closedir(sftp->sftp_handle); @@@@ -1628,7 +1646,7 @@@@ /* * Work on getting the specified file */ -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK do { sftp->sftp_handle = libssh2_sftp_open(sftp->sftp_session, sftp->path, LIBSSH2_FXF_READ, @@@@ -1654,7 +1672,7 @@@@ } #endif /* !(LIBSSH2_APINO >= 200706012030) */ -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK while ((rc = libssh2_sftp_stat(sftp->sftp_session, sftp->path, &attrs)) == LIBSSH2_ERROR_EAGAIN); #else /* !(LIBSSH2_APINO >= 200706012030) */ @@@@ -1686,7 +1704,7 @@@@ bytecount, FALSE, NULL, -1, NULL); #endif while (res == CURLE_OK) { -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK ssize_t nread; while ((nread = libssh2_sftp_read(data->reqdata.proto.ssh->sftp_handle, @@@@ -1702,7 +1720,7 @@@@ if (nread > 0) buf[nread] = 0; -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK if (nread <= 0) break; #else /* !(LIBSSH2_APINO >= 200706012030) */ @@@@ -1753,7 +1771,7 @@@@ sftp->homedir = NULL; if (sftp->sftp_handle) { -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK while ((ret = libssh2_sftp_close(sftp->sftp_handle)) == LIBSSH2_ERROR_EAGAIN); if (ret < 0) { @@@@ -1773,7 +1791,7 @@@@ } if (sftp->sftp_session) { -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK while ((ret = libssh2_sftp_shutdown(sftp->sftp_session)) == LIBSSH2_ERROR_EAGAIN); if (ret < 0) { @@@@ -1787,7 +1805,7 @@@@ } if (sftp->ssh_channel) { -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK while ((ret = libssh2_channel_close(sftp->ssh_channel)) == LIBSSH2_ERROR_EAGAIN); if (ret < 0) { @@@@ -1801,7 +1819,7 @@@@ } if (sftp->ssh_session) { -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK while (libssh2_session_disconnect(sftp->ssh_session, "Shutdown") == LIBSSH2_ERROR_EAGAIN); #else /* !(LIBSSH2_APINO >= 200706012030) */ @@@@ -1828,14 +1846,14 @@@@ ssize_t nwrite; /* libssh2_sftp_write() used to return size_t in 0.14 but is changed to ssize_t in 0.15! */ -#if defined(LIBSSH2SFTP_EAGAIN) && (LIBSSH2_APINO < 200706012030) +#if defined(LIBSSH2SFTP_EAGAIN) && defined(LIBSSH2_APINO) && (LIBSSH2_APINO < 200706012030) /* we prefer the non-blocking API but that didn't exist previously */ nwrite = (ssize_t) libssh2_sftp_writenb(conn->data->reqdata.proto.ssh->sftp_handle, mem, len); #else nwrite = (ssize_t) libssh2_sftp_write(conn->data->reqdata.proto.ssh->sftp_handle, mem, len); -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK if (nwrite == LIBSSH2_ERROR_EAGAIN) { return 0; } @@@@ -1857,7 +1875,7 @@@@ /* libssh2_sftp_read() returns size_t !*/ -#if defined(LIBSSH2SFTP_EAGAIN) && (LIBSSH2_APINO < 200706012030) +#if defined(LIBSSH2SFTP_EAGAIN) && defined(LIBSSH2_APINO) && (LIBSSH2_APINO < 200706012030) /* we prefer the non-blocking API but that didn't exist previously */ nread = (ssize_t) libssh2_sftp_readnb(conn->data->reqdata.proto.ssh->sftp_handle, mem, len); @@@@ -2058,7 +2076,7 @@@@ return err; } memset(&attrs, 0, sizeof(LIBSSH2_SFTP_ATTRIBUTES)); -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK while ((ret = libssh2_sftp_stat(sftp_session, path2, &attrs)) == LIBSSH2_ERROR_EAGAIN); @@@@ -2112,7 +2130,7 @@@@ } /* Now send the completed structure... */ -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK while ((ret = libssh2_sftp_setstat(sftp_session, path2, &attrs)) == LIBSSH2_ERROR_EAGAIN); if (ret != 0) { @@@@ -2148,7 +2166,7 @@@@ free(path1); return err; } -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK while ((ret = libssh2_sftp_symlink(sftp_session, path1, path2)) == LIBSSH2_ERROR_EAGAIN); if (ret != 0) { @@@@ -2171,7 +2189,7 @@@@ #endif /* !(LIBSSH2_APINO >= 200706012030) */ } else if (curl_strnequal(item->data, "mkdir ", 6)) { /* create dir */ -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK while ((ret = libssh2_sftp_mkdir(sftp_session, path1, 0744)) == LIBSSH2_ERROR_EAGAIN); if (ret != 0) { @@@@ -2202,7 +2220,7 @@@@ free(path1); return err; } -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK while ((ret = libssh2_sftp_rename(sftp_session, path1, path2)) == LIBSSH2_ERROR_EAGAIN); if (ret != 0) { @@@@ -2225,7 +2243,7 @@@@ #endif /* !(LIBSSH2_APINO >= 200706012030) */ } else if (curl_strnequal(item->data, "rmdir ", 6)) { /* delete dir */ -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK while ((ret = libssh2_sftp_rmdir(sftp_session, path1)) == LIBSSH2_ERROR_EAGAIN); if (ret != 0) { @@@@ -2246,7 +2264,7 @@@@ #endif /* !(LIBSSH2_APINO >= 200706012030) */ } else if (curl_strnequal(item->data, "rm ", 3)) { /* delete file */ -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK while ((ret = libssh2_sftp_unlink(sftp_session, path1)) == LIBSSH2_ERROR_EAGAIN); if (ret != 0) { @@@@ -2296,7 +2314,7 @@@@ infof(conn->data, "Creating directory '%s'\n", sftp->path); /* 'mode' - parameter is preliminary - default to 0644 */ -#if (LIBSSH2_APINO >= 200706012030) +#if HAVE_LIBSSH2_NBLOCK while ((rc = libssh2_sftp_mkdir(sftp->sftp_session, sftp->path, conn->data->set.new_directory_perms)) == LIBSSH2_ERROR_EAGAIN); @ 1.12 log @allow one to build cURL with SSH support @ text @@ 1.11 log @unbreak FTP login on sites who do not require a PASS command at all (and even choke if one is sent without request). This allows cURL 7.16.4 to again download from ftp.gnu.org. cURL 7.16.3 BTW was still ok, the bug was introduced in 7.16.3. Upstream vendor will be notified, too @ text @d3 1 a3 1 +++ lib/ftp.c 2007-07-20 09:20:11 +0200 d14 324 @ 1.10 log @upgrading package: curl 7.13.0 -> 7.13.1 @ text @d1 13 a13 245 Security Bugfixes (CAN-2005-0490) http://www.idefense.com/application/poi/display?id=202&type=vulnerabilities http://www.idefense.com/application/poi/display?id=203&type=vulnerabilities Index: lib/base64.c --- lib/base64.c.orig 2004-12-15 02:38:25 +0100 +++ lib/base64.c 2005-02-23 13:26:01 +0100 @@@@ -79,7 +79,7 @@@@ * Given a base64 string at src, decode it into the memory pointed to by * dest. Returns the length of the decoded data. */ -size_t Curl_base64_decode(const char *src, char *dest) +size_t Curl_base64_decode(const char *src, unsigned char **outptr) { int length = 0; int equalsTerm = 0; @@@@ -87,6 +87,9 @@@@ int numQuantums; unsigned char lastQuantum[3]; size_t rawlen=0; + unsigned char *newstr; + + *outptr = NULL; while((src[length] != '=') && src[length]) length++; @@@@ -97,15 +100,22 @@@@ rawlen = (numQuantums * 3) - equalsTerm; + newstr = malloc(rawlen+1); + if(!newstr) + return 0; + + *outptr = newstr; + for(i = 0; i < numQuantums - 1; i++) { - decodeQuantum((unsigned char *)dest, src); - dest += 3; src += 4; + decodeQuantum((unsigned char *)newstr, src); + newstr += 3; src += 4; } decodeQuantum(lastQuantum, src); for(i = 0; i < 3 - equalsTerm; i++) - dest[i] = lastQuantum[i]; + newstr[i] = lastQuantum[i]; + newstr[i] = 0; /* zero terminate */ return rawlen; } Index: lib/base64.h --- lib/base64.h.orig 2004-11-29 13:11:46 +0100 +++ lib/base64.h 2005-02-23 13:26:01 +0100 @@@@ -23,5 +23,5 @@@@ * $Id: base64.h,v 1.15 2004/11/29 12:11:46 bagder Exp $ ***************************************************************************/ size_t Curl_base64_encode(const char *input, size_t size, char **str); -size_t Curl_base64_decode(const char *source, char *dest); +size_t Curl_base64_decode(const char *source, unsigned char **outptr); #endif Index: lib/http_negotiate.c --- lib/http_negotiate.c.orig 2004-08-05 20:52:54 +0200 +++ lib/http_negotiate.c 2005-02-23 13:26:01 +0100 @@@@ -166,12 +166,7 @@@@ len = strlen(header); if (len > 0) { - int rawlen; - input_token.length = (len+3)/4 * 3; - input_token.value = malloc(input_token.length); - if (input_token.value == NULL) - return ENOMEM; - rawlen = Curl_base64_decode(header, input_token.value); + int rawlen = Curl_base64_decode(header, &input_token.value); if (rawlen < 0) return -1; input_token.length = rawlen; Index: lib/http_ntlm.c --- lib/http_ntlm.c.orig 2004-12-08 00:09:41 +0100 +++ lib/http_ntlm.c 2005-02-23 13:26:01 +0100 @@@@ -103,7 +103,6 @@@@ header++; if(checkprefix("NTLM", header)) { - unsigned char buffer[256]; header += strlen("NTLM"); while(*header && isspace((int)*header)) @@@@ -123,17 +122,22 @@@@ (40) Target Information (optional) security buffer(*) 32 (48) start of data block */ - - size_t size = Curl_base64_decode(header, (char *)buffer); + size_t size; + unsigned char *buffer; + size = Curl_base64_decode(header, &buffer); + if(!buffer) + return CURLNTLM_BAD; ntlm->state = NTLMSTATE_TYPE2; /* we got a type-2 */ if(size >= 48) /* the nonce of interest is index [24 .. 31], 8 bytes */ memcpy(ntlm->nonce, &buffer[24], 8); + /* FIX: add an else here! */ /* at index decimal 20, there's a 32bit NTLM flag field */ + free(buffer); } else { if(ntlm->state >= NTLMSTATE_TYPE1) Index: lib/krb4.c --- lib/krb4.c.orig 2004-11-11 17:34:24 +0100 +++ lib/krb4.c 2005-02-23 13:26:01 +0100 @@@@ -199,7 +199,8 @@@@ { int ret; char *p; - int len; + unsigned char *ptr; + size_t len; KTEXT_ST adat; MSG_DAT msg_data; int checksum; @@@@ -275,11 +276,17 @@@@ return AUTH_ERROR; } p += 5; - len = Curl_base64_decode(p, (char *)adat.dat); - if(len < 0) { + len = Curl_base64_decode(p, &ptr); + if(len > sizeof(adat.dat)-1) { + free(ptr); + len=0; + } + if(!len || !ptr) { Curl_failf(data, "Failed to decode base64 from server"); return AUTH_ERROR; } + memcpy((char *)adat.dat, ptr, len); + free(ptr); adat.length = len; ret = krb_rd_safe(adat.dat, adat.length, &d->key, (struct sockaddr_in *)hisctladdr, @@@@ -317,10 +324,11 @@@@ char *name; char *p; char passwd[100]; - int tmp; + size_t tmp; ssize_t nread; int save; CURLcode result; + unsigned char *ptr; save = Curl_set_command_prot(conn, prot_private); @@@@ -346,12 +354,18 @@@@ } p += 2; - tmp = Curl_base64_decode(p, (char *)tkt.dat); - if(tmp < 0) { + tmp = Curl_base64_decode(p, &ptr); + if(tmp >= sizeof(tkt.dat)) { + free(ptr); + tmp=0; + } + if(!tmp || !ptr) { Curl_failf(conn->data, "Failed to decode base64 in reply.\n"); Curl_set_command_prot(conn, save); return CURLE_FTP_WEIRD_SERVER_REPLY; } + memcpy((char *)tkt.dat, ptr, tmp); + free(ptr); tkt.length = tmp; tktcopy.length = tkt.length; Index: lib/security.c --- lib/security.c.orig 2004-12-15 03:32:04 +0100 +++ lib/security.c 2005-02-23 13:26:01 +0100 @@@@ -297,13 +297,15 @@@@ Curl_sec_read_msg(struct connectdata *conn, char *s, int level) { int len; - char *buf; + unsigned char *buf; int code; - buf = malloc(strlen(s)); - len = Curl_base64_decode(s + 4, buf); /* XXX */ + len = Curl_base64_decode(s + 4, &buf); /* XXX */ + if(len > 0) + len = (conn->mech->decode)(conn->app_data, buf, len, level, conn); + else + return -1; - len = (conn->mech->decode)(conn->app_data, buf, len, level, conn); if(len < 0) { free(buf); return -1; @@@@ -314,10 +316,10 @@@@ if(buf[3] == '-') code = 0; else - sscanf(buf, "%d", &code); + sscanf((char *)buf, "%d", &code); if(buf[len-1] == '\n') buf[len-1] = '\0'; - strcpy(s, buf); + strcpy(s, (char *)buf); free(buf); return code; } Index: tests/server/getpart.c --- tests/server/getpart.c.orig 2004-11-29 22:44:23 +0100 +++ tests/server/getpart.c 2005-02-23 13:26:01 +0100 @@@@ -61,11 +61,11 @@@@ { size_t len = strlen(buffer); size_t needed_len = len + *stringlen + 1; - char buf64[256]; /* big enough? */ + unsigned char *buf64=NULL; if(base64) { /* decode the given buffer first */ - len = Curl_base64_decode(buffer, buf64); /* updated len */ + len = Curl_base64_decode(buffer, &buf64); /* updated len */ buffer = buf64; needed_len = len + *stringlen + 1; /* recalculate */ } @@@@ -87,6 +87,9 @@@@ *stringlen += len; string[*stringlen]=0; + if(buf64) + free(buf64); + return string; } @ 1.10.4.1 log @Security Fix (CVE-2005-4077, OpenPKG-SA-2005.028-curl) @ text @d1 3 a3 2 Security Fix (CVE-2005-4077, OpenPKG-SA-2005.028-curl) http://curl.haxx.se/docs/adv_20051207.html d5 17 a21 13 Index: lib/url.c --- lib/url.c.orig 2005-09-30 22:04:10 +0200 +++ lib/url.c 2005-12-10 20:24:40 +0100 @@@@ -2372,12 +2372,18 @@@@ if(urllen < LEAST_PATH_ALLOC) urllen=LEAST_PATH_ALLOC; - conn->pathbuffer=(char *)malloc(urllen); + /* + * We malloc() the buffers below urllen+2 to make room for to possibilities: + * 1 - an extra terminating zero + * 2 - an extra slash (in case a syntax like "www.host.com?moo" is used) + */ d23 223 a245 10 + conn->pathbuffer=(char *)malloc(urllen+2); if(NULL == conn->pathbuffer) return CURLE_OUT_OF_MEMORY; /* really bad error */ conn->path = conn->pathbuffer; - conn->host.rawalloc=(char *)malloc(urllen); + conn->host.rawalloc=(char *)malloc(urllen+2); if(NULL == conn->host.rawalloc) return CURLE_OUT_OF_MEMORY; conn->host.name = conn->host.rawalloc; @ 1.10.2.1 log @apply security fix (CAN-2005-3185) @ text @d1 3 a3 3 Security Fix http://curl.haxx.se/libcurl-ntlmbuf.patch CAN-2005-3185 d5 75 d81 161 a241 12 --- lib/http_ntlm.c 2 Oct 2005 18:22:45 -0000 1.46 +++ lib/http_ntlm.c 12 Oct 2005 21:35:30 -0000 @@@@ -713,6 +713,13 @@@@ size=64; ntlmbuf[62]=ntlmbuf[63]=0; + /* Make sure that the user and domain strings fit in the target buffer + before we copy them there. */ + if(size + userlen + domlen >= sizeof(ntlmbuf)) { + failf(conn->data, "user + domain name too big"); + return CURLE_OUT_OF_MEMORY; + } d243 2 a244 2 memcpy(&ntlmbuf[size], domain, domlen); size += domlen; @ 1.10.2.2 log @Security Fix (CVE-2005-4077, OpenPKG-SA-2005.028-curl) @ text @a21 29 ----------------------------------------------------------------------------- Security Fix (CVE-2005-4077, OpenPKG-SA-2005.028-curl) http://curl.haxx.se/docs/adv_20051207.html Index: lib/url.c --- lib/url.c.orig 2005-09-30 22:04:10 +0200 +++ lib/url.c 2005-12-10 20:24:40 +0100 @@@@ -2372,12 +2372,18 @@@@ if(urllen < LEAST_PATH_ALLOC) urllen=LEAST_PATH_ALLOC; - conn->pathbuffer=(char *)malloc(urllen); + /* + * We malloc() the buffers below urllen+2 to make room for to possibilities: + * 1 - an extra terminating zero + * 2 - an extra slash (in case a syntax like "www.host.com?moo" is used) + */ + + conn->pathbuffer=(char *)malloc(urllen+2); if(NULL == conn->pathbuffer) return CURLE_OUT_OF_MEMORY; /* really bad error */ conn->path = conn->pathbuffer; - conn->host.rawalloc=(char *)malloc(urllen); + conn->host.rawalloc=(char *)malloc(urllen+2); if(NULL == conn->host.rawalloc) return CURLE_OUT_OF_MEMORY; conn->host.name = conn->host.rawalloc; @ 1.9 log @Security Bugfixes (CAN-2005-0490) @ text @@ 1.8 log @upgrading package: curl 7.12.3 -> 7.13.0 @ text @d1 61 a61 16 Index: lib/select.c diff -Nau lib/select.c.orig lib/select.c --- lib/select.c.orig Tue Dec 21 09:06:14 2004 +++ lib/select.c Tue Dec 21 09:06:27 2004 @@@@ -23,11 +23,11 @@@@ #include "setup.h" -#ifdef HAVE_SYS_SELECT_H -#include -#endif #ifdef HAVE_SYS_TYPES_H #include +#endif +#ifdef HAVE_SYS_SELECT_H +#include d63 182 a245 1 #ifdef HAVE_SYS_TIME_H @ 1.8.2.1 log @MFC: Security Bugfixes (CAN-2005-0490) @ text @d1 16 a16 61 Security Bugfixes (CAN-2005-0490) http://www.idefense.com/application/poi/display?id=202&type=vulnerabilities http://www.idefense.com/application/poi/display?id=203&type=vulnerabilities Index: lib/base64.c --- lib/base64.c.orig 2004-12-15 02:38:25 +0100 +++ lib/base64.c 2005-02-23 13:26:01 +0100 @@@@ -79,7 +79,7 @@@@ * Given a base64 string at src, decode it into the memory pointed to by * dest. Returns the length of the decoded data. */ -size_t Curl_base64_decode(const char *src, char *dest) +size_t Curl_base64_decode(const char *src, unsigned char **outptr) { int length = 0; int equalsTerm = 0; @@@@ -87,6 +87,9 @@@@ int numQuantums; unsigned char lastQuantum[3]; size_t rawlen=0; + unsigned char *newstr; + + *outptr = NULL; while((src[length] != '=') && src[length]) length++; @@@@ -97,15 +100,22 @@@@ rawlen = (numQuantums * 3) - equalsTerm; + newstr = malloc(rawlen+1); + if(!newstr) + return 0; + + *outptr = newstr; + for(i = 0; i < numQuantums - 1; i++) { - decodeQuantum((unsigned char *)dest, src); - dest += 3; src += 4; + decodeQuantum((unsigned char *)newstr, src); + newstr += 3; src += 4; } decodeQuantum(lastQuantum, src); for(i = 0; i < 3 - equalsTerm; i++) - dest[i] = lastQuantum[i]; + newstr[i] = lastQuantum[i]; + newstr[i] = 0; /* zero terminate */ return rawlen; } Index: lib/base64.h --- lib/base64.h.orig 2004-11-29 13:11:46 +0100 +++ lib/base64.h 2005-02-23 13:26:01 +0100 @@@@ -23,5 +23,5 @@@@ * $Id: curl.patch,v 1.9 2005/02/23 14:15:05 rse Exp $ ***************************************************************************/ size_t Curl_base64_encode(const char *input, size_t size, char **str); -size_t Curl_base64_decode(const char *source, char *dest); +size_t Curl_base64_decode(const char *source, unsigned char **outptr); a17 182 Index: lib/http_negotiate.c --- lib/http_negotiate.c.orig 2004-08-05 20:52:54 +0200 +++ lib/http_negotiate.c 2005-02-23 13:26:01 +0100 @@@@ -166,12 +166,7 @@@@ len = strlen(header); if (len > 0) { - int rawlen; - input_token.length = (len+3)/4 * 3; - input_token.value = malloc(input_token.length); - if (input_token.value == NULL) - return ENOMEM; - rawlen = Curl_base64_decode(header, input_token.value); + int rawlen = Curl_base64_decode(header, &input_token.value); if (rawlen < 0) return -1; input_token.length = rawlen; Index: lib/http_ntlm.c --- lib/http_ntlm.c.orig 2004-12-08 00:09:41 +0100 +++ lib/http_ntlm.c 2005-02-23 13:26:01 +0100 @@@@ -103,7 +103,6 @@@@ header++; if(checkprefix("NTLM", header)) { - unsigned char buffer[256]; header += strlen("NTLM"); while(*header && isspace((int)*header)) @@@@ -123,17 +122,22 @@@@ (40) Target Information (optional) security buffer(*) 32 (48) start of data block */ - - size_t size = Curl_base64_decode(header, (char *)buffer); + size_t size; + unsigned char *buffer; + size = Curl_base64_decode(header, &buffer); + if(!buffer) + return CURLNTLM_BAD; ntlm->state = NTLMSTATE_TYPE2; /* we got a type-2 */ if(size >= 48) /* the nonce of interest is index [24 .. 31], 8 bytes */ memcpy(ntlm->nonce, &buffer[24], 8); + /* FIX: add an else here! */ /* at index decimal 20, there's a 32bit NTLM flag field */ + free(buffer); } else { if(ntlm->state >= NTLMSTATE_TYPE1) Index: lib/krb4.c --- lib/krb4.c.orig 2004-11-11 17:34:24 +0100 +++ lib/krb4.c 2005-02-23 13:26:01 +0100 @@@@ -199,7 +199,8 @@@@ { int ret; char *p; - int len; + unsigned char *ptr; + size_t len; KTEXT_ST adat; MSG_DAT msg_data; int checksum; @@@@ -275,11 +276,17 @@@@ return AUTH_ERROR; } p += 5; - len = Curl_base64_decode(p, (char *)adat.dat); - if(len < 0) { + len = Curl_base64_decode(p, &ptr); + if(len > sizeof(adat.dat)-1) { + free(ptr); + len=0; + } + if(!len || !ptr) { Curl_failf(data, "Failed to decode base64 from server"); return AUTH_ERROR; } + memcpy((char *)adat.dat, ptr, len); + free(ptr); adat.length = len; ret = krb_rd_safe(adat.dat, adat.length, &d->key, (struct sockaddr_in *)hisctladdr, @@@@ -317,10 +324,11 @@@@ char *name; char *p; char passwd[100]; - int tmp; + size_t tmp; ssize_t nread; int save; CURLcode result; + unsigned char *ptr; save = Curl_set_command_prot(conn, prot_private); @@@@ -346,12 +354,18 @@@@ } p += 2; - tmp = Curl_base64_decode(p, (char *)tkt.dat); - if(tmp < 0) { + tmp = Curl_base64_decode(p, &ptr); + if(tmp >= sizeof(tkt.dat)) { + free(ptr); + tmp=0; + } + if(!tmp || !ptr) { Curl_failf(conn->data, "Failed to decode base64 in reply.\n"); Curl_set_command_prot(conn, save); return CURLE_FTP_WEIRD_SERVER_REPLY; } + memcpy((char *)tkt.dat, ptr, tmp); + free(ptr); tkt.length = tmp; tktcopy.length = tkt.length; Index: lib/security.c --- lib/security.c.orig 2004-12-15 03:32:04 +0100 +++ lib/security.c 2005-02-23 13:26:01 +0100 @@@@ -297,13 +297,15 @@@@ Curl_sec_read_msg(struct connectdata *conn, char *s, int level) { int len; - char *buf; + unsigned char *buf; int code; - buf = malloc(strlen(s)); - len = Curl_base64_decode(s + 4, buf); /* XXX */ + len = Curl_base64_decode(s + 4, &buf); /* XXX */ + if(len > 0) + len = (conn->mech->decode)(conn->app_data, buf, len, level, conn); + else + return -1; - len = (conn->mech->decode)(conn->app_data, buf, len, level, conn); if(len < 0) { free(buf); return -1; @@@@ -314,10 +316,10 @@@@ if(buf[3] == '-') code = 0; else - sscanf(buf, "%d", &code); + sscanf((char *)buf, "%d", &code); if(buf[len-1] == '\n') buf[len-1] = '\0'; - strcpy(s, buf); + strcpy(s, (char *)buf); free(buf); return code; } Index: tests/server/getpart.c --- tests/server/getpart.c.orig 2004-11-29 22:44:23 +0100 +++ tests/server/getpart.c 2005-02-23 13:26:01 +0100 @@@@ -61,11 +61,11 @@@@ { size_t len = strlen(buffer); size_t needed_len = len + *stringlen + 1; - char buf64[256]; /* big enough? */ + unsigned char *buf64=NULL; if(base64) { /* decode the given buffer first */ - len = Curl_base64_decode(buffer, buf64); /* updated len */ + len = Curl_base64_decode(buffer, &buf64); /* updated len */ buffer = buf64; needed_len = len + *stringlen + 1; /* recalculate */ } @@@@ -87,6 +87,9 @@@@ *stringlen += len; string[*stringlen]=0; + if(buf64) + free(buf64); + return string; } d19 1 @ 1.8.2.2 log @fix patch @ text @d57 1 a57 1 * $Id: base64.h,v 1.15 2004/11/29 12:11:46 bagder Exp $ @ 1.8.2.3 log @apply security fix (CAN-2005-3185) @ text @a245 23 ----------------------------------------------------------------------------- Security Fix http://curl.haxx.se/libcurl-ntlmbuf.patch CAN-2005-3185 Index: lib/http_ntlm.c --- lib/http_ntlm.c 2 Oct 2005 18:22:45 -0000 1.46 +++ lib/http_ntlm.c 12 Oct 2005 21:35:30 -0000 @@@@ -713,6 +713,13 @@@@ size=64; ntlmbuf[62]=ntlmbuf[63]=0; + /* Make sure that the user and domain strings fit in the target buffer + before we copy them there. */ + if(size + userlen + domlen >= sizeof(ntlmbuf)) { + failf(conn->data, "user + domain name too big"); + return CURLE_OUT_OF_MEMORY; + } + memcpy(&ntlmbuf[size], domain, domlen); size += domlen; @ 1.8.2.4 log @Security Fix (CVE-2005-4077, OpenPKG-SA-2005.028-curl) @ text @a268 29 ------------------------------------------------------------------------------ Security Fix (CVE-2005-4077, OpenPKG-SA-2005.028-curl) http://curl.haxx.se/docs/adv_20051207.html Index: lib/url.c --- lib/url.c.orig 2005-09-30 22:04:10 +0200 +++ lib/url.c 2005-12-10 20:24:40 +0100 @@@@ -2372,12 +2372,18 @@@@ if(urllen < LEAST_PATH_ALLOC) urllen=LEAST_PATH_ALLOC; - conn->pathbuffer=(char *)malloc(urllen); + /* + * We malloc() the buffers below urllen+2 to make room for to possibilities: + * 1 - an extra terminating zero + * 2 - an extra slash (in case a syntax like "www.host.com?moo" is used) + */ + + conn->pathbuffer=(char *)malloc(urllen+2); if(NULL == conn->pathbuffer) return CURLE_OUT_OF_MEMORY; /* really bad error */ conn->path = conn->pathbuffer; - conn->host.rawalloc=(char *)malloc(urllen); + conn->host.rawalloc=(char *)malloc(urllen+2); if(NULL == conn->host.rawalloc) return CURLE_OUT_OF_MEMORY; conn->host.name = conn->host.rawalloc; @ 1.7 log @add patch to correct latest header file ordering problems @ text @@ 1.6 log @remove obsoleted patch, too @ text @d1 7 a7 5 --- lib/urldata.h.orig 2002-11-12 00:03:05.000000000 +0100 +++ lib/urldata.h 2002-12-31 10:53:15.000000000 +0100 @@@@ -114,9 +114,6 @@@@ }; #endif d9 2 a10 2 -#ifndef HAVE_OPENSSL_ENGINE_H -typedef void ENGINE; d12 6 a17 13 /* struct for data related to SSL and SSL connections */ struct ssl_connect_data { bool use; /* use ssl encrypted communications TRUE/FALSE */ --- curl-config.in.orig 2002-11-20 20:04:34.000000000 +0100 +++ curl-config.in 2003-02-13 16:48:59.000000000 +0100 @@@@ -107,8 +107,7 @@@@ ;; --cflags) - #echo -I@@includedir@@ - echo "" + echo "-I@@includedir@@" ;; d19 1 a19 1 --libs) @ 1.5 log @single dir is enough @ text @@ 1.4 log @fix curl-config and modernize configure flags @ text @d21 1 a21 1 + echo "-I@@includedir@@/curl -I@@includedir@@" @ 1.3 log @add missing patch to CVS @ text @d13 12 @ 1.3.2.1 log @mass Merge-From-CURRENT (MFC) in preparation for OpenPKG 1.3 [class BASE only] @ text @@ 1.2 log @I hate out-commented stuff, so remove this now obsolete dirt @ text @d1 12 a12 12 *** src/writeout.c.orig Tue May 14 18:17:56 2002 --- src/writeout.c Tue May 14 18:15:19 2002 *************** *** 27,32 **** --- 27,33 ---- #include #ifdef HAVE_SYS_SELECT_H + #include #include #endif @ 1.1 log @upgrading upstream version from 7.9.6 to 7.9.7 @ text @@