Compare commits
No commits in common. "df60676c56ee2e0cc2a5235213079ebb9df4ad9b" and "e223abecc5dfcb399562e966de8677c8381db27b" have entirely different histories.
df60676c56
...
e223abecc5
@ -1,27 +0,0 @@
|
|||||||
From 0c3b6966fec92957c9d0e0ed0d83bc0716641d66 Mon Sep 17 00:00:00 2001
|
|
||||||
From: panxiaohe <panxh.life@foxmail.com>
|
|
||||||
Date: Tue, 22 Mar 2022 10:46:34 +0800
|
|
||||||
Subject: [PATCH] diff3: set flagging to true in -X option
|
|
||||||
|
|
||||||
The logic of diff3 -X option was changed because
|
|
||||||
commit 4c92a4 changed "FALLTHROUGH" to "break".
|
|
||||||
|
|
||||||
---
|
|
||||||
src/diff3.c | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/src/diff3.c b/src/diff3.c
|
|
||||||
index 6be7e3c..fc4adbc 100644
|
|
||||||
--- a/src/diff3.c
|
|
||||||
+++ b/src/diff3.c
|
|
||||||
@@ -304,6 +304,7 @@ main (int argc, char **argv)
|
|
||||||
break;
|
|
||||||
case 'X':
|
|
||||||
overlap_only = true;
|
|
||||||
+ flagging = true;
|
|
||||||
incompat |= 1 << OPTION_X;
|
|
||||||
break;
|
|
||||||
case 'E':
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
BIN
diffutils-3.7.tar.xz
Normal file
BIN
diffutils-3.7.tar.xz
Normal file
Binary file not shown.
Binary file not shown.
@ -11,8 +11,8 @@ diff -up diffutils-3.6/src/diff.c.i18n diffutils-3.6/src/diff.c
|
|||||||
recursively. */
|
recursively. */
|
||||||
static bool recursive;
|
static bool recursive;
|
||||||
@@ -298,6 +300,13 @@ main (int argc, char **argv)
|
@@ -298,6 +300,13 @@ main (int argc, char **argv)
|
||||||
|
excluded = new_exclude ();
|
||||||
presume_output_tty = false;
|
presume_output_tty = false;
|
||||||
xstdopen ();
|
|
||||||
|
|
||||||
+#ifdef HANDLE_MULTIBYTE
|
+#ifdef HANDLE_MULTIBYTE
|
||||||
+ if (MB_CUR_MAX > 1)
|
+ if (MB_CUR_MAX > 1)
|
||||||
@ -398,15 +398,15 @@ diff -up diffutils-3.6/src/io.c.i18n diffutils-3.6/src/io.c
|
|||||||
+
|
+
|
||||||
/* Hash this line until we find a newline. */
|
/* Hash this line until we find a newline. */
|
||||||
switch (ig_white_space)
|
switch (ig_white_space)
|
||||||
{
|
{
|
||||||
@@ -397,7 +708,7 @@ find_and_hash_each_line (struct file_dat
|
@@ -397,7 +708,7 @@ find_and_hash_each_line (struct file_dat
|
||||||
else if (!diff_length_compare_anyway)
|
else if (!diff_length_compare_anyway)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
- if (! lines_differ (eqline, ip))
|
- if (! lines_differ (eqline, ip))
|
||||||
+ if (! lines_differ (eqline, eqs[i].length + 1, ip, length + 1))
|
+ if (! lines_differ (eqline, eqs[i].length + 1, ip, length + 1))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
diff -up diffutils-3.6/src/util.c.i18n diffutils-3.6/src/util.c
|
diff -up diffutils-3.6/src/util.c.i18n diffutils-3.6/src/util.c
|
||||||
--- diffutils-3.6/src/util.c.i18n 2017-05-18 18:39:59.000000000 +0100
|
--- diffutils-3.6/src/util.c.i18n 2017-05-18 18:39:59.000000000 +0100
|
||||||
|
|||||||
@ -1,13 +1,11 @@
|
|||||||
Name: diffutils
|
Name: diffutils
|
||||||
Version: 3.8
|
Version: 3.7
|
||||||
Release: 3
|
Release: 3
|
||||||
Summary: A GNU collection of diff utilities
|
Summary: A GNU collection of diff utilities
|
||||||
URL: http://www.gnu.org/software/diffutils/diffutils.html
|
URL: http://www.gnu.org/software/diffutils/diffutils.html
|
||||||
Source: ftp://ftp.gnu.org/gnu/diffutils/diffutils-%{version}.tar.xz
|
Source: ftp://ftp.gnu.org/gnu/diffutils/diffutils-%{version}.tar.xz
|
||||||
Patch1: diffutils-cmp-s-empty.patch
|
Patch1: diffutils-cmp-s-empty.patch
|
||||||
Patch2: diffutils-i18n.patch
|
Patch2: diffutils-i18n.patch
|
||||||
Patch3: diff3-set-flagging-to-true-in-X-option.patch
|
|
||||||
Patch4: sdiff-fix-unlikely-memory-leak.patch
|
|
||||||
|
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Provides: bundled(gnulib)
|
Provides: bundled(gnulib)
|
||||||
@ -28,9 +26,6 @@ GNU Diffutils is a package of several programs related to finding differences be
|
|||||||
autoreconf -ifv
|
autoreconf -ifv
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%ifarch aarch64
|
|
||||||
CFLAGS="$RPM_OPT_FLAGS -fsigned-char"
|
|
||||||
%endif
|
|
||||||
%configure
|
%configure
|
||||||
make PR_PROGRAM=%{_bindir}/pr
|
make PR_PROGRAM=%{_bindir}/pr
|
||||||
|
|
||||||
@ -56,43 +51,13 @@ cat tests/test-suite.log
|
|||||||
%exclude %{_infodir}/dir
|
%exclude %{_infodir}/dir
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Oct 19 2022 zhangruifang <zhangruifang1@h-partners.com> - 3.8-3
|
* Mon Nov 11 2019 shenyangyang<shenyangyang4@huawei.com> 3.7-3
|
||||||
- Type:bugfix
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:fix unlikely memory leak
|
|
||||||
|
|
||||||
* Tue Mar 22 2022 panxiaohe<panxh.life@foxmail.com> - 3.8-2
|
|
||||||
- Type:bugfix
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:set flagging to true in diff3 -X option
|
|
||||||
|
|
||||||
* Tue Nov 30 2021 zoulin<zoulin13@huawei.com> - 3.8-1
|
|
||||||
- Type:enhancement
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:update version to 3.8
|
|
||||||
|
|
||||||
* Wed Aug 11 2021 wangjie<wangjie375@huawei.com> - 3.7-5
|
|
||||||
- Type:bugfix
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:fix missing binary operator before token "("
|
|
||||||
|
|
||||||
* Wed Mar 24 2021 zoulin<zoulin13@huawei.com> - 3.7-4
|
|
||||||
- Type:enhancement
|
|
||||||
- ID:NA
|
|
||||||
- SUG:NA
|
|
||||||
- DESC:add -fsign-char for aarch64 for test-localeconv
|
|
||||||
|
|
||||||
* Mon Nov 11 2019 shenyangyang<shenyangyang4@huawei.com> - 3.7-3
|
|
||||||
- Type:enhancement
|
- Type:enhancement
|
||||||
- ID:NA
|
- ID:NA
|
||||||
- SUG:NA
|
- SUG:NA
|
||||||
- DESC:delete unneeded comments
|
- DESC:delete unneeded comments
|
||||||
|
|
||||||
* Thu Oct 24 2019 shenyangyang<shenyangyang4@huawei.com> - 3.7-2
|
* Thu Oct 24 2019 shenyangyang<shenyangyang4@huawei.com> 3.7-2
|
||||||
- Type:enhancement
|
- Type:enhancement
|
||||||
- ID:NA
|
- ID:NA
|
||||||
- SUG:NA
|
- SUG:NA
|
||||||
|
|||||||
@ -1,41 +0,0 @@
|
|||||||
From f2e2b4d3c3288e6cae3918fc432bdab8c0c485b7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
|
||||||
Date: Sun, 22 Aug 2021 13:54:04 -0700
|
|
||||||
Subject: [PATCH] sdiff: fix unlikely memory leak
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
* src/sdiff.c (temporary_file): Fix memory leak when mkstemp fails.
|
|
||||||
Don’t assume temporary file name length fits in ‘int’.
|
|
||||||
---
|
|
||||||
src/sdiff.c | 13 ++++++++-----
|
|
||||||
1 file changed, 8 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/sdiff.c b/src/sdiff.c
|
|
||||||
index 11e4da9..ab12987 100644
|
|
||||||
--- a/src/sdiff.c
|
|
||||||
+++ b/src/sdiff.c
|
|
||||||
@@ -1163,11 +1163,14 @@ temporary_file (void)
|
|
||||||
{
|
|
||||||
char const *tmpdir = getenv (TMPDIR_ENV);
|
|
||||||
char const *dir = tmpdir ? tmpdir : P_tmpdir;
|
|
||||||
- char *buf = xmalloc (strlen (dir) + 1 + 5 + 6 + 1);
|
|
||||||
- int fd;
|
|
||||||
- sprintf (buf, "%s/sdiffXXXXXX", dir);
|
|
||||||
- fd = mkstemp (buf);
|
|
||||||
- if (0 <= fd)
|
|
||||||
+ size_t dirlen = strlen (dir);
|
|
||||||
+ char *buf = xmalloc (dirlen + 1 + 5 + 6 + 1);
|
|
||||||
+ memcpy (buf, dir, dirlen);
|
|
||||||
+ strcpy (buf + dirlen, "/sdiffXXXXXX");
|
|
||||||
+ int fd = mkstemp (buf);
|
|
||||||
+ if (fd < 0)
|
|
||||||
+ free (buf);
|
|
||||||
+ else
|
|
||||||
tmpname = buf;
|
|
||||||
return fd;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user