File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ mod end_of_index_entry {
21
21
}
22
22
23
23
let start_of_eoie = data. len ( ) - EndOfIndexEntry :: SIZE_WITH_HEADER - hash_len;
24
- let ext_data = & data[ start_of_eoie..] [ .. hash_len] ;
24
+ let ext_data = & data[ start_of_eoie..data . len ( ) - hash_len] ;
25
25
26
26
let ( signature, ext_size, ext_data) = extension:: decode_header ( ext_data) ;
27
27
if signature != EndOfIndexEntry :: SIGNATURE || ext_size as usize != EndOfIndexEntry :: SIZE {
@@ -32,7 +32,6 @@ mod end_of_index_entry {
32
32
let offset = read_u32 ( offset) as usize ;
33
33
if offset < header:: SIZE || offset > start_of_eoie || checksum. len ( ) != git_hash:: Kind :: Sha1 . len_in_bytes ( )
34
34
{
35
- dbg ! ( "checksum too small" ) ;
36
35
return None ;
37
36
}
38
37
@@ -49,8 +48,9 @@ mod end_of_index_entry {
49
48
if hasher. digest ( ) != checksum {
50
49
return None ;
51
50
}
51
+ // The last-to-this chunk ends where ours starts
52
52
if last_chunk
53
- . map ( |s| s. as_ptr_range ( ) != ext_data . as_ptr_range ( ) )
53
+ . map ( |s| s. as_ptr_range ( ) . end != ( & data [ start_of_eoie ] ) as * const _ )
54
54
. unwrap_or ( true )
55
55
{
56
56
return None ;
You can’t perform that action at this time.
0 commit comments