<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/packfile.c, branch gitk-resize-error</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=gitk-resize-error</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=gitk-resize-error'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2022-01-12T23:11:41Z</updated>
<entry>
<title>Merge branch 'jt/pack-header-lshift-overflow'</title>
<updated>2022-01-12T23:11:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-01-12T23:11:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=c9c082850d263f073483ebcaa118c3f8be2061c4'/>
<id>urn:sha1:c9c082850d263f073483ebcaa118c3f8be2061c4</id>
<content type='text'>
* jt/pack-header-lshift-overflow:
  packfile: fix off-by-one error in decoding logic
</content>
</entry>
<entry>
<title>packfile: fix off-by-one error in decoding logic</title>
<updated>2022-01-12T20:14:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-01-12T20:11:42Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=a5c97b016421a2869b460bbf6bdcd43dc186d433'/>
<id>urn:sha1:a5c97b016421a2869b460bbf6bdcd43dc186d433</id>
<content type='text'>
shift count being exactly at 7-bit smaller than the long is OK; on
32-bit architecture, shift count starts at 4 and goes through 11, 18
and 25, at which point the guard triggers one iteration too early.

Reported-by: Marc Strapetz &lt;marc.strapetz@syntevo.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tb/pack-revindex-on-disk-cleanup'</title>
<updated>2021-12-15T17:39:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-12-15T17:39:50Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=79aee56c1ee342953a6d9f49f45b89d7f44a624f'/>
<id>urn:sha1:79aee56c1ee342953a6d9f49f45b89d7f44a624f</id>
<content type='text'>
Code clean-up.

* tb/pack-revindex-on-disk-cleanup:
  packfile: make `close_pack_revindex()` static
</content>
</entry>
<entry>
<title>Merge branch 'jt/pack-header-lshift-overflow'</title>
<updated>2021-12-10T22:35:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-12-10T22:35:08Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=2d5b70de2d285ed938877c0d9f869ab062037a3b'/>
<id>urn:sha1:2d5b70de2d285ed938877c0d9f869ab062037a3b</id>
<content type='text'>
The code to decode the length of packed object size has been
corrected.

* jt/pack-header-lshift-overflow:
  packfile: avoid overflowing shift during decode
</content>
</entry>
<entry>
<title>packfile: make `close_pack_revindex()` static</title>
<updated>2021-12-05T07:01:38Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2021-12-04T22:51:38Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=0bf0de6cc70361b7847264050d03b91f6d423813'/>
<id>urn:sha1:0bf0de6cc70361b7847264050d03b91f6d423813</id>
<content type='text'>
Since its definition in 2f4ba2a867 (packfile: prepare for the existence
of '*.rev' files, 2021-01-25), the only caller of
`close_pack_revindex()` was within packfile.c.

Thus there is no need for this to be exposed via packfile.h, and instead
can remain static within packfile.c's compilation unit. While we're
here, move the function's opening brace onto its own line.

Noticed-by: Ramsay Jones &lt;ramsay@ramsayjones.plus.com&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mc/clean-smudge-with-llp64'</title>
<updated>2021-11-29T23:41:51Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-11-29T23:41:51Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=f9ba6acaa9348ea7b733bf78adc2f084247a912f'/>
<id>urn:sha1:f9ba6acaa9348ea7b733bf78adc2f084247a912f</id>
<content type='text'>
The clean/smudge conversion code path has been prepared to better
work on platforms where ulong is narrower than size_t.

* mc/clean-smudge-with-llp64:
  clean/smudge: allow clean filters to process extremely large files
  odb: guard against data loss checking out a huge file
  git-compat-util: introduce more size_t helpers
  odb: teach read_blob_entry to use size_t
  t1051: introduce a smudge filter test for extremely large files
  test-lib: add prerequisite for 64-bit platforms
  test-tool genzeros: generate large amounts of data more efficiently
  test-genzeros: allow more than 2G zeros in Windows
</content>
</entry>
<entry>
<title>packfile: avoid overflowing shift during decode</title>
<updated>2021-11-11T18:06:37Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2021-11-10T23:40:33Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=34de5b8eac2743497bc1785f661b4184adce21f3'/>
<id>urn:sha1:34de5b8eac2743497bc1785f661b4184adce21f3</id>
<content type='text'>
unpack_object_header_buffer() attempts to protect against overflowing
left shifts, but the limit of the shift amount should not be the size of
the variable being shifted. It should be the size minus the size of its
contents. Fix that accordingly.

This was noticed at $DAYJOB by a fuzzer running internally.

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>odb: guard against data loss checking out a huge file</title>
<updated>2021-11-03T18:22:27Z</updated>
<author>
<name>Matt Cooper</name>
<email>vtbassmatt@gmail.com</email>
</author>
<published>2021-11-02T15:46:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=d6a09e795d77ddc76c5141047340dc3cb62355f4'/>
<id>urn:sha1:d6a09e795d77ddc76c5141047340dc3cb62355f4</id>
<content type='text'>
This introduces an additional guard for platforms where `unsigned long`
and `size_t` are not of the same size. If the size of an object in the
database would overflow `unsigned long`, instead we now exit with an
error.

A complete fix will have to update _many_ other functions throughout the
codebase to use `size_t` instead of `unsigned long`. It will have to be
implemented at some stage.

This commit puts in a stop-gap for the time being.

Helped-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Matt Cooper &lt;vtbassmatt@gmail.com&gt;
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rs/close-pack-leakfix'</title>
<updated>2021-10-04T04:49:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-04T04:49:20Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=068966d2e8eab8b9c25a991bcd8e20d6323daff8'/>
<id>urn:sha1:068966d2e8eab8b9c25a991bcd8e20d6323daff8</id>
<content type='text'>
Leakfix.

* rs/close-pack-leakfix:
  packfile: release bad_objects in close_pack()
</content>
</entry>
<entry>
<title>packfile: release bad_objects in close_pack()</title>
<updated>2021-09-24T16:22:46Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2021-09-24T06:10:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=8c6b4332b47792947f29d3abd729b8290add96fd'/>
<id>urn:sha1:8c6b4332b47792947f29d3abd729b8290add96fd</id>
<content type='text'>
Unusable entries of a damaged pack file are recorded in the oidset
bad_objects.  Release it when we're done with the pack.

This doesn't affect intact packs because an empty oidset requires
no allocation.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
