File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1268,13 +1268,13 @@ static off64_t nth_packed_object_offset_locked(struct git_pack_file *p, uint32_t
12681268 end = index + p -> index_map .len ;
12691269 index += 4 * 256 ;
12701270 if (p -> index_version == 1 )
1271- return ntohl (* ((uint32_t * )(index + (p -> oid_size + 4 ) * n )));
1271+ return ntohl (* ((uint32_t * )(index + (p -> oid_size + 4 ) * ( size_t ) n )));
12721272
1273- index += 8 + p -> num_objects * (p -> oid_size + 4 );
1273+ index += 8 + ( size_t ) p -> num_objects * (p -> oid_size + 4 );
12741274 off32 = ntohl (* ((uint32_t * )(index + 4 * n )));
12751275 if (!(off32 & 0x80000000 ))
12761276 return off32 ;
1277- index += p -> num_objects * 4 + (off32 & 0x7fffffff ) * 8 ;
1277+ index += ( size_t ) p -> num_objects * 4 + (off32 & 0x7fffffff ) * 8 ;
12781278
12791279 /* Make sure we're not being sent out of bounds */
12801280 if (index >= end - 8 )
You can’t perform that action at this time.
0 commit comments