drop obsolete patches, update to lynx 2.9.0dev.10

Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
This commit is contained in:
Thomas E. Dickey 2022-01-07 15:04:10 -05:00
parent 7fef638783
commit ce1b7a3197
No known key found for this signature in database
GPG Key ID: CC2AF4472167BE03
4 changed files with 10 additions and 199 deletions

View File

@ -1,25 +0,0 @@
From d8a64ed1d63710ad764fbf3b1fb28d08204f9e72 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Wed, 13 Feb 2013 15:28:36 +0100
Subject: [PATCH] avoid build failure caused by mistakenly excluded <locale.h>
---
src/LYMain.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/LYMain.c b/src/LYMain.c
index 9528be2..aaddb7b 100644
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -58,7 +58,7 @@
#include <io.h>
#endif
-#if defined(LOCALE) && (!defined(HAVE_LIBINTL_H) || !defined(LC_ALL))
+#if defined(LOCALE)
#undef gettext /* Solaris locale.h prototypes gettext() */
#include <locale.h>
#ifndef HAVE_GETTEXT
--
1.7.1

View File

@ -1,51 +0,0 @@
From e786483fb4b6fd2460c9a58ad7074e82ecf91747 Mon Sep 17 00:00:00 2001
From: Tomas Hoger <thoger@redhat.com>
Date: Thu, 19 Aug 2021 16:50:02 +0200
Subject: [PATCH] Upstream patch for CVE-2021-38165
Extracted from lynx 2.9.0dev.9.
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1994998#c2
---
WWW/Library/Implementation/HTTP.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c
index 41ab849..4a50b41 100644
--- a/WWW/Library/Implementation/HTTP.c
+++ b/WWW/Library/Implementation/HTTP.c
@@ -762,6 +762,23 @@ static char *StripIpv6Brackets(char *host)
}
#endif
+/*
+ * Remove user/password, if any, from the given host-string.
+ */
+#ifdef USE_SSL
+static char *StripUserAuthents(char *host)
+{
+ char *p = strchr(host, '@');
+
+ if (p != NULL) {
+ char *q = host;
+
+ while ((*q++ = *++p) != '\0') ;
+ }
+ return host;
+}
+#endif
+
/* Load Document from HTTP Server HTLoadHTTP()
* ==============================
*
@@ -957,6 +974,7 @@ static int HTLoadHTTP(const char *arg,
/* get host we're connecting to */
ssl_host = HTParse(url, "", PARSE_HOST);
ssl_host = StripIpv6Brackets(ssl_host);
+ ssl_host = StripUserAuthents(ssl_host);
#if defined(USE_GNUTLS_FUNCS)
ret = gnutls_server_name_set(handle->gnutls_state,
GNUTLS_NAME_DNS,
--
2.31.1

View File

@ -1,105 +0,0 @@
From 0bd3f2aa9bd75263901e1f57a6cd9c4015084408 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Tue, 6 Nov 2018 12:32:04 +0100
Subject: [PATCH] lynx: fix bugs detected by static analysis
---
WWW/Library/Implementation/HTGopher.c | 1 +
samples/lynxdump | 1 +
src/LYBookmark.c | 2 ++
src/LYDownload.c | 1 +
src/LYLeaks.c | 24 ++++--------------------
5 files changed, 9 insertions(+), 20 deletions(-)
diff --git a/WWW/Library/Implementation/HTGopher.c b/WWW/Library/Implementation/HTGopher.c
index a9ad41e..36ff592 100644
--- a/WWW/Library/Implementation/HTGopher.c
+++ b/WWW/Library/Implementation/HTGopher.c
@@ -1651,6 +1651,7 @@ static int HTLoadCSO(const char *arg,
(*Target->isa->put_block) (Target, buf, (int) strlen(buf));
(*Target->isa->_free) (Target);
free_CSOfields();
+ BStrFree(command);
return HT_LOADED;
}
/*
diff --git a/samples/lynxdump b/samples/lynxdump
index f79be2f..a0e9ae2 100755
--- a/samples/lynxdump
+++ b/samples/lynxdump
@@ -12,4 +12,5 @@ if test $HOME/.lynxrc ; then
fi
echo 'keypad_mode=NUMBERS_AS_ARROWS' >> $MYTMP/.lynxrc
HOME=$MYTMP; export HOME
+umask $oldmask
lynx -justify -dump -force_html -with_backspaces -nolist $*
diff --git a/src/LYBookmark.c b/src/LYBookmark.c
index c3116ef..6464d96 100644
--- a/src/LYBookmark.c
+++ b/src/LYBookmark.c
@@ -303,6 +303,7 @@ void save_bookmark_link(const char *address,
LYMBM_statusline(CANCELLED);
LYSleepMsg();
FREE(bookmark_URL);
+ BStrFree(tmp_data);
return;
}
} while (!havevisible(string_data->str));
@@ -347,6 +348,7 @@ void save_bookmark_link(const char *address,
LYSleepAlert();
FREE(Title);
FREE(bookmark_URL);
+ BStrFree(tmp_data);
return;
}
diff --git a/src/LYDownload.c b/src/LYDownload.c
index cf1ea98..9cf712d 100644
--- a/src/LYDownload.c
+++ b/src/LYDownload.c
@@ -456,6 +456,7 @@ void LYDownload(char *line)
cleanup:
FREE(Line);
BStrFree(buffer);
+ BStrFree(command);
return;
}
diff --git a/src/LYLeaks.c b/src/LYLeaks.c
index 2f2de28..8c236ff 100644
--- a/src/LYLeaks.c
+++ b/src/LYLeaks.c
@@ -1090,26 +1090,10 @@ static char *LYLeakSAVsprintf(char **dest,
mark_realloced(ALp_old, *dest, strlen(*dest) + 1, cp_File, ssi_Line);
return (*dest);
}
- if (vp_realloced == vp_oldAlloced) {
- ALp_new->SL_memory.cp_FileName = old_cp_File;
- ALp_new->SL_memory.ssi_LineNumber = old_ssi_Line;
- ALp_new->SL_realloc.cp_FileName = cp_File;
- ALp_new->SL_realloc.ssi_LineNumber = ssi_Line;
- return (*dest);
- }
- /* Look up again, list may have changed! - kw */
- ALp_old = FindInList(vp_oldAlloced);
- if (ALp_old == NULL) {
- ALp_new->SL_memory.cp_FileName = old_cp_File;
- ALp_new->SL_memory.ssi_LineNumber = old_ssi_Line;
- ALp_new->SL_realloc.cp_FileName = cp_File;
- ALp_new->SL_realloc.ssi_LineNumber = ssi_Line;
- } else {
- ALp_new->SL_memory.cp_FileName = old_cp_File;
- ALp_new->SL_memory.ssi_LineNumber = old_ssi_Line;
- ALp_new->SL_realloc.cp_FileName = cp_File;
- ALp_new->SL_realloc.ssi_LineNumber = ssi_Line;
- }
+ ALp_new->SL_memory.cp_FileName = old_cp_File;
+ ALp_new->SL_memory.ssi_LineNumber = old_ssi_Line;
+ ALp_new->SL_realloc.cp_FileName = cp_File;
+ ALp_new->SL_realloc.ssi_LineNumber = ssi_Line;
}
return (*dest);
}
--
2.17.2

View File

@ -1,12 +1,12 @@
%global devrel 1
%global devrel dev.10
Summary: A text-based Web browser
Name: lynx
Version: 2.8.9
Release: 14%{?dist}
Version: 2.9.0
Release: %{devrel}%{?dist}
License: GPLv2
Source: https://invisible-mirror.net/archives/lynx/tarballs/lynx%{version}rel.%{devrel}.tar.bz2
URL: http://lynx.browser.org/
Source: https://invisible-mirror.net/archives/lynx/tarballs/lynx%{version}%{devrel}.tar.bz2
URL: https://lynx.invisible-island.net/
# RH specific tweaks - directory layout, utf-8 by default, misc. configuration
Patch0: lynx-2.8.9-redhat.patch
@ -20,15 +20,6 @@ Patch1: lynx-2.8.9-build.patch
# [CVE-2008-4690]
Patch2: lynx-CVE-2008-4690.patch
# avoid build failure caused by mistakenly excluded <locale.h>
Patch3: lynx-2.8.8-locale.patch
# fix bugs detected by static analysis
Patch4: lynx-2.8.9-static-analysis.patch
# fix disclosure of HTTP auth credentials via SNI data (CVE-2021-38165)
Patch5: lynx-2.8.9-CVE-2021-38165.patch
Provides: webclient
Provides: text-www-browser
BuildRequires: dos2unix
@ -54,14 +45,11 @@ advantage Lynx has over graphical browsers is speed; Lynx starts and
exits quickly and swiftly displays web pages.
%prep
%setup -q -n lynx2.8.9rel.%{devrel}
%setup -q -n lynx%{version}%{devrel}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
sed -e "s,^HELPFILE:.*,HELPFILE:file://localhost%{_pkgdocdir}/lynx_help/lynx_help_main.html,g" -i lynx.cfg
@ -139,6 +127,10 @@ EOF
%config(noreplace,missingok) %{_sysconfdir}/lynx-site.cfg
%changelog
* Fri Jan 07 2022 Thomas E. Dickey - 2.9.0dev.10
- Correct homepage URL.
- Update to lynx 2.9.0dev.10, removing obsolete patches.
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 2.8.9-14
- Rebuilt with OpenSSL 3.0.0