diff options
author | jbj <devnull@localhost> | 1999-03-22 16:23:05 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1999-03-22 16:23:05 +0000 |
commit | 7944ca9ba3f29bc3a2f6ba69d2d0c55f080d6e6d (patch) | |
tree | 28abbf570d97285d9900655c30f8acd417ec062a | |
parent | 2f5f89f2a3a974ce54f4670edc91c2b56e0b2551 (diff) | |
download | rpm-7944ca9ba3f29bc3a2f6ba69d2d0c55f080d6e6d.tar.gz rpm-7944ca9ba3f29bc3a2f6ba69d2d0c55f080d6e6d.tar.bz2 rpm-7944ca9ba3f29bc3a2f6ba69d2d0c55f080d6e6d.zip |
fix: segfault from double close on ftpGetFileDesc ftpAbort path.
CVS patchset: 2908
CVS date: 1999/03/22 16:23:05
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | ftp.c | 8 | ||||
-rw-r--r-- | po/rpm.pot | 35 | ||||
-rw-r--r-- | url.c | 2 |
4 files changed, 26 insertions, 20 deletions
@@ -1,6 +1,7 @@ 2.92 -> 2.93 - eliminate old rpmrc configuration syntax. - pgp5 support (Carlo Wood <carlo@runaway.xs4all.nl>) + - fix: segfault from double close on ftpGetFileDesc ftpAbort path. 2.91 -> 2.92 - update with libtool-2.4f. @@ -500,9 +500,11 @@ fprintf(stderr, "-> ABOR\n"); } static int ftpGetFileDone(urlinfo *u) { - if (u->ftpGetFileDoneNeeded && ftpCheckResponse(u, NULL)) - return FTPERR_BAD_SERVER_RESPONSE; - u->ftpGetFileDoneNeeded = 0; + if (u->ftpGetFileDoneNeeded) { + u->ftpGetFileDoneNeeded = 0; + if (ftpCheckResponse(u, NULL)) + return FTPERR_BAD_SERVER_RESPONSE; + } return 0; } diff --git a/po/rpm.pot b/po/rpm.pot index c800c500a..85728a17b 100644 --- a/po/rpm.pot +++ b/po/rpm.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1999-03-21 14:06-0500\n" +"POT-Creation-Date: 1999-03-22 11:02-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -212,55 +212,55 @@ msgstr "" msgid "rpmconvert 1.0 - converting database in /var/lib/rpm\n" msgstr "" -#: ../ftp.c:640 +#: ../ftp.c:642 msgid "Success" msgstr "" -#: ../ftp.c:643 +#: ../ftp.c:645 msgid "Bad server response" msgstr "" -#: ../ftp.c:646 +#: ../ftp.c:648 msgid "Server IO error" msgstr "" -#: ../ftp.c:649 +#: ../ftp.c:651 msgid "Server timeout" msgstr "" -#: ../ftp.c:652 +#: ../ftp.c:654 msgid "Unable to lookup server host address" msgstr "" -#: ../ftp.c:655 +#: ../ftp.c:657 msgid "Unable to lookup server host name" msgstr "" -#: ../ftp.c:658 +#: ../ftp.c:660 msgid "Failed to connect to server" msgstr "" -#: ../ftp.c:661 +#: ../ftp.c:663 msgid "Failed to establish data connection to server" msgstr "" -#: ../ftp.c:664 +#: ../ftp.c:666 msgid "IO error to local file" msgstr "" -#: ../ftp.c:667 +#: ../ftp.c:669 msgid "Error setting remote server to passive mode" msgstr "" -#: ../ftp.c:670 +#: ../ftp.c:672 msgid "File not found on server" msgstr "" -#: ../ftp.c:673 +#: ../ftp.c:675 msgid "Abort in progress" msgstr "" -#: ../ftp.c:677 +#: ../ftp.c:679 msgid "Unknown or unexpected error" msgstr "" @@ -1464,17 +1464,18 @@ msgstr "" msgid "url port must be a number\n" msgstr "" -#: ../url.c:307 +#. XXX PARANOIA +#: ../url.c:308 #, c-format msgid "logging into %s as %s, pw %s\n" msgstr "" -#: ../lib/rpmdb.c:168 ../url.c:418 +#: ../lib/rpmdb.c:168 ../url.c:420 #, c-format msgid "failed to open %s\n" msgstr "" -#: ../url.c:433 +#: ../url.c:435 #, c-format msgid "failed to create %s\n" msgstr "" @@ -304,6 +304,7 @@ static int urlConnect(const char * url, urlinfo ** uret) if (!strcmp(u->service, "ftp") && u->ftpControl < 0) { + u->ftpGetFileDoneNeeded = 0; /* XXX PARANOIA */ rpmMessage(RPMMESS_DEBUG, _("logging into %s as %s, pw %s\n"), u->host, u->user ? u->user : "ftp", @@ -355,6 +356,7 @@ int ufdClose(FD_t fd) /* Close the ftp control channel (not strictly necessary, but ... */ if (u->ftpControl >= 0) { ftpAbort(fd); + fd = NULL; /* XXX ftpAbort does fdClose(fd) */ close(u->ftpControl); u->ftpControl = -1; } |