<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/patch.git/tests, branch master</title>
<subtitle>git.savannah.gnu.org: git/patch.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/'/>
<entry>
<title>Fix test for presence of BASH_LINENO[0]</title>
<updated>2021-01-08T09:15:31+00:00</updated>
<author>
<name>Kerin Millar</name>
<email>kfm@plushkava.net</email>
</author>
<published>2021-01-03T07:25:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=7623b2dc0d1837ecfd58f32efc78e35834deeb38'/>
<id>7623b2dc0d1837ecfd58f32efc78e35834deeb38</id>
<content type='text'>
eval is not some sort of magical sandbox for executing code that might cause
the shell's parser to take exception. Render the test resilient by carrying
it out within a subshell. While at it, position the redirection so that
STDERR is, in fact, muted.

Signed-off-by: Kerin Millar &lt;kfm@plushkava.net&gt;
Reported-by: Paolo Pedroni &lt;paolo.pedroni@iol.it&gt;
Closes: https://bugs.gentoo.org/738810
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
eval is not some sort of magical sandbox for executing code that might cause
the shell's parser to take exception. Render the test resilient by carrying
it out within a subshell. While at it, position the redirection so that
STDERR is, in fact, muted.

Signed-off-by: Kerin Millar &lt;kfm@plushkava.net&gt;
Reported-by: Paolo Pedroni &lt;paolo.pedroni@iol.it&gt;
Closes: https://bugs.gentoo.org/738810
</pre>
</div>
</content>
</entry>
<entry>
<title>Add missing-section tests to context-format test case</title>
<updated>2019-12-23T23:26:49+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2019-07-30T10:10:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=78ed9decdf54d6185d3d3d1ef8784f5978f81422'/>
<id>78ed9decdf54d6185d3d3d1ef8784f5978f81422</id>
<content type='text'>
* tests/context-format: Add tests with a missing pattern and a missing
replacement section in a hunk.  Patch should fill in the missing
sections from the existing sections.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* tests/context-format: Add tests with a missing pattern and a missing
replacement section in a hunk.  Patch should fill in the missing
sections from the existing sections.
</pre>
</div>
</content>
</entry>
<entry>
<title>Skip "ed" test when the ed utility is not installed</title>
<updated>2019-06-27T09:09:31+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2019-06-27T09:09:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=a5b442ce01b80a758606ede316f739426a12bc33'/>
<id>a5b442ce01b80a758606ede316f739426a12bc33</id>
<content type='text'>
* tests/ed-style: Require ed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* tests/ed-style: Require ed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't leak temporary file on failed multi-file ed-style patch</title>
<updated>2018-05-07T13:15:33+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>jdelvare@suse.de</email>
</author>
<published>2018-05-07T13:14:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=369dcccdfa6336e5a873d6d63705cfbe04c55727'/>
<id>369dcccdfa6336e5a873d6d63705cfbe04c55727</id>
<content type='text'>
The previous fix worked fine with single-file ed-style patches, but
would still leak temporary files in the case of multi-file ed-style
patch. Fix that case as well, and extend the test case to check for
it.

* src/patch.c (main): Unlink TMPEDNAME if needed before moving to
  the next file in a patch.

This closes bug #53820:
https://savannah.gnu.org/bugs/index.php?53820

Fixes: 123eaff0d5d1 ("Fix arbitrary command execution in ed-style patches (CVE-2018-1000156)")
Fixes: 19599883ffb6 ("Don't leak temporary file on failed ed-style patch")
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous fix worked fine with single-file ed-style patches, but
would still leak temporary files in the case of multi-file ed-style
patch. Fix that case as well, and extend the test case to check for
it.

* src/patch.c (main): Unlink TMPEDNAME if needed before moving to
  the next file in a patch.

This closes bug #53820:
https://savannah.gnu.org/bugs/index.php?53820

Fixes: 123eaff0d5d1 ("Fix arbitrary command execution in ed-style patches (CVE-2018-1000156)")
Fixes: 19599883ffb6 ("Don't leak temporary file on failed ed-style patch")
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix 'ed-style' test failure.</title>
<updated>2018-04-07T14:41:14+00:00</updated>
<author>
<name>Bruno Haible</name>
<email>bruno@clisp.org</email>
</author>
<published>2018-04-07T10:34:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=458ac51a05426c1af9aa6bf1342ecf60728c19b4'/>
<id>458ac51a05426c1af9aa6bf1342ecf60728c19b4</id>
<content type='text'>
* tests/ed-style: Remove '?' line from expected output.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* tests/ed-style: Remove '?' line from expected output.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix arbitrary command execution in ed-style patches (CVE-2018-1000156)</title>
<updated>2018-04-06T10:23:02+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2018-04-06T10:14:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=123eaff0d5d1aebe128295959435b9ca5909c26d'/>
<id>123eaff0d5d1aebe128295959435b9ca5909c26d</id>
<content type='text'>
* src/pch.c (do_ed_script): Write ed script to a temporary file instead
of piping it to ed: this will cause ed to abort on invalid commands
instead of rejecting them and carrying on.
* tests/ed-style: New test case.
* tests/Makefile.am (TESTS): Add test case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/pch.c (do_ed_script): Write ed script to a temporary file instead
of piping it to ed: this will cause ed to abort on invalid commands
instead of rejecting them and carrying on.
* tests/ed-style: New test case.
* tests/Makefile.am (TESTS): Add test case.
</pre>
</div>
</content>
</entry>
<entry>
<title>Test suite: fix Korn shell incompatibility</title>
<updated>2018-02-07T16:05:00+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2018-02-07T16:05:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=074e2395f81d0ecaa66b71a6c228c70b49db72e5'/>
<id>074e2395f81d0ecaa66b71a6c228c70b49db72e5</id>
<content type='text'>
tests/merge: In a Korn shell, shift apparently fails when $# is 0.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
tests/merge: In a Korn shell, shift apparently fails when $# is 0.
</pre>
</div>
</content>
</entry>
<entry>
<title>Test suite compatibility fixes</title>
<updated>2018-02-07T12:19:24+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2018-02-07T11:10:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=f6bc5b14bd193859851d15a049bafb1007acd288'/>
<id>f6bc5b14bd193859851d15a049bafb1007acd288</id>
<content type='text'>
* tests/crlf-handling, tests/git-cleanup, tests/test-lib.sh: Use printf
instead of echo -e / echo -n for compatibility with systems that don't
support these echo options.
* tests/merge: Minor other cleanups.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* tests/crlf-handling, tests/git-cleanup, tests/test-lib.sh: Use printf
instead of echo -e / echo -n for compatibility with systems that don't
support these echo options.
* tests/merge: Minor other cleanups.
</pre>
</div>
</content>
</entry>
<entry>
<title>Create git diff files with indicated mode</title>
<updated>2018-01-23T09:56:27+00:00</updated>
<author>
<name>Thomas Orgis</name>
<email>thomas@orgis.org</email>
</author>
<published>2018-01-22T15:46:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=592e1f9163d6261359aa87c2c99d411c0dacf6f3'/>
<id>592e1f9163d6261359aa87c2c99d411c0dacf6f3</id>
<content type='text'>
* src/patch.c (main): Create git diff files with indicated mode.
* tests/file-create-modes: New test case.
* tests/Makefile.am (TESTS): Add test case.

This fixes building current Linux 4.14.x from the signed tarball and
patch file, where the patch creates a script with the executable bit
set.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/patch.c (main): Create git diff files with indicated mode.
* tests/file-create-modes: New test case.
* tests/Makefile.am (TESTS): Add test case.

This fixes building current Linux 4.14.x from the signed tarball and
patch file, where the patch creates a script with the executable bit
set.
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't allow hunks to overlap</title>
<updated>2017-09-06T16:35:44+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2017-09-06T16:29:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=00947f4111fbb388852e0626ba7bd1aef5d53cd9'/>
<id>00947f4111fbb388852e0626ba7bd1aef5d53cd9</id>
<content type='text'>
* src/patch.c (locate_hunk): Don't allow a hunk to overlap with the
previous one.
* tests/false-match: Add regression test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/patch.c (locate_hunk): Don't allow a hunk to overlap with the
previous one.
* tests/false-match: Add regression test.
</pre>
</div>
</content>
</entry>
</feed>
