From c5733106535c56bb665467d28ec140b86a26fe68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Mu=C5=BEila?= Date: Fri, 5 May 2023 15:56:30 +0200 Subject: [PATCH] Update to new upstream release Resolves: CVE-2022-46663 --- .gitignore | 1 + less-458-lessecho-usage.patch | 4 ++-- less-458-lesskey-usage.patch | 4 ++-- less-475-fsync.patch | 14 +++++++------- less.spec | 8 ++++++-- sources | 2 +- 6 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 34ad566..de5c14c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /less-581.2.tar.gz /less-590.tar.gz /less-608.tar.gz +/less-633.tar.gz diff --git a/less-458-lessecho-usage.patch b/less-458-lessecho-usage.patch index 14a7f37..b16369b 100644 --- a/less-458-lessecho-usage.patch +++ b/less-458-lessecho-usage.patch @@ -2,7 +2,7 @@ diff -upr less-458_orig/lessecho.c less-458_work/lessecho.c --- less-458_orig/lessecho.c 2013-05-07 14:03:52.091104655 +0200 +++ less-458_work/lessecho.c 2013-05-07 11:21:10.883991862 +0200 @@ -41,7 +41,27 @@ static int num_metachars = 0; - pr_usage(VOID_PARAM) + static void pr_usage(void) { fprintf(stderr, - "usage: lessecho [-ox] [-cx] [-pn] [-dn] [-mx] [-nn] [-ex] [-fn] [-a] file ...\n"); @@ -29,5 +29,5 @@ diff -upr less-458_orig/lessecho.c less-458_work/lessecho.c + " -?\t- prints this help\n"); } - static void + static void pr_version(void) diff --git a/less-458-lesskey-usage.patch b/less-458-lesskey-usage.patch index 1ebf55f..e9c5cc3 100644 --- a/less-458-lesskey-usage.patch +++ b/less-458-lesskey-usage.patch @@ -2,8 +2,8 @@ diff -upr less-458_orig/lesskey.c less-458_work/lesskey.c --- less-458_orig/lesskey.c 2013-05-07 14:03:52.062104533 +0200 +++ less-458_work/lesskey.c 2013-05-07 11:21:10.881991855 +0200 @@ -217,7 +217,15 @@ extern char version[]; - static void - usage(void) + + static void usage(void) { - fprintf(stderr, "usage: lesskey [-o output] [input]\n"); + fprintf(stderr, "usage: lesskey [-o output] [input]\n\n"); diff --git a/less-475-fsync.patch b/less-475-fsync.patch index ce81b48..c964b31 100644 --- a/less-475-fsync.patch +++ b/less-475-fsync.patch @@ -19,17 +19,17 @@ diff -ur less-581.2/configure.ac less_fsync/configure.ac [Define HAVE_FILENO if you have the fileno() macro.]) AH_TEMPLATE([HAVE_ERRNO], @@ -274,7 +276,7 @@ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int f(int a) { return a; }]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ANSI_PROTOS)],[AC_MSG_RESULT(no)]) # Checks for library functions. - AC_TYPE_SIGNAL --AC_CHECK_FUNCS([fchmod fsync nanosleep poll popen realpath _setjmp sigprocmask sigsetmask snprintf stat system ttyname usleep]) -+AC_CHECK_FUNCS([fchmod nanosleep poll popen realpath _setjmp sigprocmask sigsetmask snprintf stat system ttyname usleep]) +-AC_CHECK_FUNCS([fchmod fsync nanosleep poll popen realpath _setjmp sigprocmask sigsetmask snprintf stat strsignal system ttyname usleep]) ++AC_CHECK_FUNCS([fchmod nanosleep poll popen realpath _setjmp sigprocmask sigsetmask snprintf stat strsignal system ttyname usleep]) # AC_CHECK_FUNCS may not work for inline functions, so test these separately. AC_MSG_CHECKING(for memcpy) @@ -321,6 +323,16 @@ - #endif], [static char *x; x = strerror(0);], - [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRERROR)], [AC_MSG_RESULT(no)]) + #include + #endif]], [[static char *x; x = strerror(0);]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRERROR)],[AC_MSG_RESULT(no)]) +AC_MSG_CHECKING(for fsync) +AC_TRY_RUN([ @@ -42,5 +42,5 @@ diff -ur less-581.2/configure.ac less_fsync/configure.ac +}], [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FSYNC)], [AC_MSG_RESULT(no)]) + AC_MSG_CHECKING(for sys_errlist) - AC_TRY_LINK(, [extern char *sys_errlist[]; static char **x; x = sys_errlist;], - [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_ERRLIST)], [AC_MSG_RESULT(no)]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[extern char *sys_errlist[]; static char **x; x = sys_errlist;]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_ERRLIST)],[AC_MSG_RESULT(no)]) + diff --git a/less.spec b/less.spec index c150b24..07797fd 100644 --- a/less.spec +++ b/less.spec @@ -1,7 +1,7 @@ Summary: A text file browser similar to more, but better Name: less -Version: 608 -Release: 2%{?dist} +Version: 633 +Release: 1%{?dist} License: GPLv3+ or BSD Source0: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz Source1: lesspipe.sh @@ -61,6 +61,10 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d %{_mandir}/man1/* %changelog +* Fri May 05 2023 Matej Mužila - 633-1 +- Update to new upstream release +- Resolves: CVE-2022-46663 + * Thu Jan 19 2023 Fedora Release Engineering - 608-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index e602b21..eb34862 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (less-608.tar.gz) = 7945b7f88921832ebb1b45fba8cbb449ee0133342796b654a52c146dfff3d84db18724ee84e53349eeea6017a0ebe2d8eb5366210275981dde7bb7190118fa66 +SHA512 (less-633.tar.gz) = a29aaf72abca07fb29d12f218bbd422a39e3898b3d53e8dbd5265ae47ecf68b88c3381aa3a9bf7caa8db1e2d8e2c138b333f0d69fddd4cf014e39118c53f7fb1