Skip to content

Commit f54cda1

Browse files
author
Philip Oakley
committed
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 b7bd443 commit f54cda1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packfile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,7 @@ size_t unpack_object_header_buffer(const unsigned char *buf,
10951095
size = c & 15;
10961096
shift = 4;
10971097
while (c & 0x80) {
1098-
if (len <= used || bitsizeof(long) <= shift) {
1098+
if (len <= used || bitsizeof(size_t) <= shift) {
10991099
error("bad object header");
11001100
size = used = 0;
11011101
break;

0 commit comments

Comments
 (0)