<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/odb.c, branch editorconfig</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/'/>
<entry>
<title>odb: fix writing to fake write streams</title>
<updated>2018-03-23T10:06:22+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-03-23T09:59:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=a52b4c51c0a7de341f5b2cef48ac6d7c8b9476e1'/>
<id>a52b4c51c0a7de341f5b2cef48ac6d7c8b9476e1</id>
<content type='text'>
In commit 7ec7aa4a7 (odb: assert on logic errors when writing objects,
2018-02-01), the check for whether we are trying to overflowing the fake
stream buffer was changed from returning an error to raising an assert.
The conversion forgot though that the logic around `assert`s are
basically inverted. Previously, if the statement

    stream-&gt;written + len &gt; steram-&gt;size

evaluated to true, we would return a `-1`. Now we are asserting that
this statement is true, and in case it is not we will raise an error. So
the conversion to the `assert` in fact changed the behaviour to the
complete opposite intention.

Fix the assert by inverting its condition again and add a regression
test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In commit 7ec7aa4a7 (odb: assert on logic errors when writing objects,
2018-02-01), the check for whether we are trying to overflowing the fake
stream buffer was changed from returning an error to raising an assert.
The conversion forgot though that the logic around `assert`s are
basically inverted. Previously, if the statement

    stream-&gt;written + len &gt; steram-&gt;size

evaluated to true, we would return a `-1`. Now we are asserting that
this statement is true, and in case it is not we will raise an error. So
the conversion to the `assert` in fact changed the behaviour to the
complete opposite intention.

Fix the assert by inverting its condition again and add a regression
test.
</pre>
</div>
</content>
</entry>
<entry>
<title>odb: fix memory leaks due to not freeing hash context</title>
<updated>2018-02-09T17:31:50+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-02-09T17:31:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=a43bcd2c5392586f987d0c3c6247e75699ba135d'/>
<id>a43bcd2c5392586f987d0c3c6247e75699ba135d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>odb: error when we can't create object header</title>
<updated>2018-02-09T10:58:22+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-02-01T14:22:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=619f61a8f110de71422d62e14e22c84865c3091c'/>
<id>619f61a8f110de71422d62e14e22c84865c3091c</id>
<content type='text'>
Return an error to the caller when we can't create an object header for
some reason (printf failure) instead of simply asserting.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Return an error to the caller when we can't create an object header for
some reason (printf failure) instead of simply asserting.
</pre>
</div>
</content>
</entry>
<entry>
<title>odb: assert on logic errors when writing objects</title>
<updated>2018-02-09T10:16:46+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-02-01T13:54:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=7ec7aa4a7396c80bfe557590bfae83b7a51458d3'/>
<id>7ec7aa4a7396c80bfe557590bfae83b7a51458d3</id>
<content type='text'>
There's no recovery possible if we're so confused or corrupted that
we're trying to overwrite our memory.  Simply assert.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's no recovery possible if we're so confused or corrupted that
we're trying to overwrite our memory.  Simply assert.
</pre>
</div>
</content>
</entry>
<entry>
<title>git_odb__hashfd: propagate error on failures</title>
<updated>2018-02-09T10:16:46+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-02-01T14:35:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=138e4c2bd07690e8956c4733b90b024c65a2ef88'/>
<id>138e4c2bd07690e8956c4733b90b024c65a2ef88</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>git_odb__hashobj: provide errors messages on failures</title>
<updated>2018-02-09T10:16:46+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-02-01T13:11:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=35ed256bb7c971e56f3f544c3529a53e39f39b28'/>
<id>35ed256bb7c971e56f3f544c3529a53e39f39b28</id>
<content type='text'>
Provide error messages on hash failures: assert when given invalid
input instead of failing with a user error; provide error messages
on program errors.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provide error messages on hash failures: assert when given invalid
input instead of failing with a user error; provide error messages
on program errors.
</pre>
</div>
</content>
</entry>
<entry>
<title>odb: check for alloc errors on hardcoded objects</title>
<updated>2018-02-09T10:16:46+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-01-31T17:34:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=59d99adcdeef4b08c5aec7fb3b000831e4fe21c5'/>
<id>59d99adcdeef4b08c5aec7fb3b000831e4fe21c5</id>
<content type='text'>
It's unlikely that we'll fail to allocate a single byte, but let's check
for allocation failures for good measure.  Untangle `-1` being a marker
of not having found the hardcoded odb object; use that to reflect actual
errors.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's unlikely that we'll fail to allocate a single byte, but let's check
for allocation failures for good measure.  Untangle `-1` being a marker
of not having found the hardcoded odb object; use that to reflect actual
errors.
</pre>
</div>
</content>
</entry>
<entry>
<title>odb: error when we can't alloc an object</title>
<updated>2018-02-09T10:16:46+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-01-31T17:30:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=ef9028642ab3805b139fbfed0244e48d96af3728'/>
<id>ef9028642ab3805b139fbfed0244e48d96af3728</id>
<content type='text'>
At the moment, we're swallowing the allocation failure.  We need to
return the error to the caller.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At the moment, we're swallowing the allocation failure.  We need to
return the error to the caller.
</pre>
</div>
</content>
</entry>
<entry>
<title>odb: provide length and type with streaming read</title>
<updated>2018-02-02T00:35:49+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2017-12-17T01:12:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=97f9a5f0bca920e2ce260b17fa7cea0a2c0991ca'/>
<id>97f9a5f0bca920e2ce260b17fa7cea0a2c0991ca</id>
<content type='text'>
The streaming read functionality should provide the length and the type
of the object, like the normal read functionality does.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The streaming read functionality should provide the length and the type
of the object, like the normal read functionality does.
</pre>
</div>
</content>
</entry>
<entry>
<title>odb: reject reading and writing null OIDs</title>
<updated>2018-01-26T13:08:40+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-01-12T08:59:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=275f103d4c515d40c73cc17ae7880f1091414393'/>
<id>275f103d4c515d40c73cc17ae7880f1091414393</id>
<content type='text'>
The null OID (hash with all zeroes) indicates a missing object in
upstream git and is thus not a valid object ID. Add defensive
measurements to avoid writing such a hash to the object database in the
very unlikely case where some data results in the null OID. Furthermore,
add shortcuts when reading the null OID from the ODB to avoid ever
returning an object when a faulty repository may contain the null OID.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The null OID (hash with all zeroes) indicates a missing object in
upstream git and is thus not a valid object ID. Add defensive
measurements to avoid writing such a hash to the object database in the
very unlikely case where some data results in the null OID. Furthermore,
add shortcuts when reading the null OID from the ODB to avoid ever
returning an object when a faulty repository may contain the null OID.
</pre>
</div>
</content>
</entry>
</feed>
