Skip to content

Commit a8e0ee7

Browse files
Philip Oakleydscho
Philip Oakley
authored andcommitted
packfile.c: set shift limit to sizeof(size_t), not long
The code base now uses size_t for all memsized variables. Allow shift to reach that bitness level. Signed-off-by: Philip Oakley <[email protected]>
1 parent eeb79ff commit a8e0ee7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packfile.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ size_t unpack_object_header_buffer(const unsigned char *buf,
10571057
size = c & 15;
10581058
shift = 4;
10591059
while (c & 0x80) {
1060-
if (len <= used || bitsizeof(long) <= shift) {
1060+
if (len <= used || bitsizeof(size_t) <= shift) {
10611061
error("bad object header");
10621062
size = used = 0;
10631063
break;

0 commit comments

Comments
 (0)