<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/patch.git/src/patch.c, branch testing</title>
<subtitle>git.savannah.gnu.org: git/patch.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/'/>
<entry>
<title>Move path traversal error reporting into main()</title>
<updated>2015-03-05T21:57:07+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2015-02-28T12:28:49+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=6fbdcefe7d099731a18a5a82cfea6ee87e332556'/>
<id>6fbdcefe7d099731a18a5a82cfea6ee87e332556</id>
<content type='text'>
* src/safe.c (traverse_another_path): Don't report errors here.
* src/patch.c (main): Instead, recognize and report them here. Detect when an
output file name is invalid; it doesn't make sense to try creating a
reject file based on the same outbut file name in that case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/safe.c (traverse_another_path): Don't report errors here.
* src/patch.c (main): Instead, recognize and report them here. Detect when an
output file name is invalid; it doesn't make sense to try creating a
reject file based on the same outbut file name in that case.
</pre>
</div>
</content>
</entry>
<entry>
<title>Move error reporting out of make_tempfile()</title>
<updated>2015-02-28T20:10:34+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2015-02-28T13:00:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=c5da382c0baa822606236fe65527c027c1250822'/>
<id>c5da382c0baa822606236fe65527c027c1250822</id>
<content type='text'>
* src/util.c (make_tempfile): Remove error reporting here.
* src/inp.c (plan_b): Readd error reporting here.
* src/patch.c (main): Likewise.
* src/pch.c (open_patch_file): Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/util.c (make_tempfile): Remove error reporting here.
* src/inp.c (plan_b): Readd error reporting here.
* src/patch.c (main): Likewise.
* src/pch.c (open_patch_file): Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix handling of renamed files</title>
<updated>2015-02-22T17:50:16+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2015-02-22T17:42:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=db9f39507e3bb739b696c523274cb34adc5e4895'/>
<id>db9f39507e3bb739b696c523274cb34adc5e4895</id>
<content type='text'>
When a file has already been renamed, make sure it is not renamed back to its
old name.  Reported by Guido Draheim.
* src/patch.c (main): Make sure we never rename a file back to its previous
name. Report when a file was renamed already.
* tests/copy-rename: Add "already renamed" test cases.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a file has already been renamed, make sure it is not renamed back to its
old name.  Reported by Guido Draheim.
* src/patch.c (main): Make sure we never rename a file back to its previous
name. Report when a file was renamed already.
* tests/copy-rename: Add "already renamed" test cases.
</pre>
</div>
</content>
</entry>
<entry>
<title>patch: git-diff mode: do not change permissions if there isn't an explicit mode change.</title>
<updated>2015-01-31T21:14:01+00:00</updated>
<author>
<name>Quentin Casasnovas</name>
<email>quentin.casasnovas@oracle.com</email>
</author>
<published>2015-01-27T13:03:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=82b800c9552a088a241457948219d25ce0a407a4'/>
<id>82b800c9552a088a241457948219d25ce0a407a4</id>
<content type='text'>
Signed-off-by: Quentin Casasnovas &lt;quentin.casasnovas@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Quentin Casasnovas &lt;quentin.casasnovas@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use symlink-safe system call replacements</title>
<updated>2015-01-31T21:14:00+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2015-01-31T02:15:08+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=71a3172c7ecb1fad7965843ba373e99a034ee1ce'/>
<id>71a3172c7ecb1fad7965843ba373e99a034ee1ce</id>
<content type='text'>
Use the symlink-safe replacements for system calls in many places throughout
the code: In some places this makes patch safe against path traversal attacks;
in other places, it saves the kernel from having to re-traverse the pathnames.
* src/inp.c (plan_b): Use safe_open() + fdopen() instead of fopen().
* src/util.c (copy_attr): Document why we are safe here.
(create_backup): Use safe_open() instead of creat().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the symlink-safe replacements for system calls in many places throughout
the code: In some places this makes patch safe against path traversal attacks;
in other places, it saves the kernel from having to re-traverse the pathnames.
* src/inp.c (plan_b): Use safe_open() + fdopen() instead of fopen().
* src/util.c (copy_attr): Document why we are safe here.
(create_backup): Use safe_open() instead of creat().
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid closing file descriptor twice</title>
<updated>2015-01-31T17:25:12+00:00</updated>
<author>
<name>Tim Waugh</name>
<email>twaugh@redhat.com</email>
</author>
<published>2015-01-28T17:11:35+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=75fcb4b560d40c7244831cba0bd49ff64f93a32d'/>
<id>75fcb4b560d40c7244831cba0bd49ff64f93a32d</id>
<content type='text'>
* src/patch.c (main): Make sure we don't close() outfd after passing it on to
fdopen(): the file descriptor might have been reused in the meantime.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/patch.c (main): Make sure we don't close() outfd after passing it on to
fdopen(): the file descriptor might have been reused in the meantime.
</pre>
</div>
</content>
</entry>
<entry>
<title>For renames and copies, make sure that both file names are valid</title>
<updated>2015-01-21T15:32:41+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2015-01-21T12:01:08+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=17953b5893f7c9835f0dd2a704ba04e0371d2cbd'/>
<id>17953b5893f7c9835f0dd2a704ba04e0371d2cbd</id>
<content type='text'>
* src/patch.c (main): Allow there_is_another_patch() to set the
skip_rest_of_patch flag.
* src/pch.c (intuit_diff_type): For renames and copies, also check the "other"
file name.
(pch_copy, pch_rename): Now that both names are checked in intuit_diff_type(),
we know they are defined here.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/patch.c (main): Allow there_is_another_patch() to set the
skip_rest_of_patch flag.
* src/pch.c (intuit_diff_type): For renames and copies, also check the "other"
file name.
(pch_copy, pch_rename): Now that both names are checked in intuit_diff_type(),
we know they are defined here.
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't try applying hunks at offsets that can't work</title>
<updated>2015-01-20T11:00:24+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@gnu.org</email>
</author>
<published>2015-01-20T11:00:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=19285e563aa32a96672373a9bfe8a71a37bd7bfe'/>
<id>19285e563aa32a96672373a9bfe8a71a37bd7bfe</id>
<content type='text'>
* src/patch.c (locate_hunk): Start trying to apply the hunk at the minimum
offset which puts the hunk in the valid range of lines. This will often still
be offset 0.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/patch.c (locate_hunk): Start trying to apply the hunk at the minimum
offset which puts the hunk in the valid range of lines. This will often still
be offset 0.
</pre>
</div>
</content>
</entry>
<entry>
<title>savebuf/savestr error handling</title>
<updated>2014-11-30T14:35:44+00:00</updated>
<author>
<name>Tobias Stoeckmann</name>
<email>tobias@stoeckmann.org</email>
</author>
<published>2014-11-16T18:24:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=e4c6511f4660047957cd5be4e76964542e2d9447'/>
<id>e4c6511f4660047957cd5be4e76964542e2d9447</id>
<content type='text'>
* src/patch.c (get_some_switches): The function savebuf (and therefore savestr)
copies strings using malloc.  If malloc fails, NULL is returned.  This is
intentional behavior so that in case of failure during "plan a" patching, "plan
b" can step in.  The return value has to be properly checked for NULL.  If the
return value must not be NULL, use xstrdup instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/patch.c (get_some_switches): The function savebuf (and therefore savestr)
copies strings using malloc.  If malloc fails, NULL is returned.  This is
intentional behavior so that in case of failure during "plan a" patching, "plan
b" can step in.  The return value has to be properly checked for NULL.  If the
return value must not be NULL, use xstrdup instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve error message when refusing to delete file</title>
<updated>2014-08-12T23:16:44+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@linbit.com</email>
</author>
<published>2014-08-12T23:13:37+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/patch.git/commit/?id=f926295f4fdfb2777bbd4bfa51441fd5a4f0a9b0'/>
<id>f926295f4fdfb2777bbd4bfa51441fd5a4f0a9b0</id>
<content type='text'>
* src/patch.c: Improve error message.
* tests/create-delete: Update the test case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/patch.c: Improve error message.
* tests/create-delete: Update the test case.
</pre>
</div>
</content>
</entry>
</feed>
