Skip to content

Commit d59f496

Browse files
committed
Merge pull request #1940 from bettio/add-missing-skip_compact_term
jit.erl: add missing skip_compact_term for big integers These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
2 parents 48c8624 + 6fc6d49 commit d59f496

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libs/jit/src/jit.erl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3418,6 +3418,12 @@ skip_compact_term(<<_:4, ?COMPACT_INTEGER:4, _Rest/binary>> = Bin) ->
34183418
Rest;
34193419
skip_compact_term(<<_Val:3, ?COMPACT_LARGE_INTEGER_11BITS:5, _NextByte, Rest/binary>>) ->
34203420
Rest;
3421+
skip_compact_term(<<7:3, ?COMPACT_LARGE_INTEGER_NBITS:5, Rest/binary>>) ->
3422+
{DecodedLen, Rest0} = decode_literal(Rest),
3423+
% 7 actually means 7 + 2, that means an integer that is >= 9 bytes
3424+
IntegerByteLen = DecodedLen + 9,
3425+
<<_Value:IntegerByteLen/binary, Rest/binary>> = Rest0,
3426+
Rest;
34213427
skip_compact_term(
34223428
<<Size0:3, ?COMPACT_LARGE_INTEGER_NBITS:5, _Value:(8 * (Size0 + 2))/signed, Rest/binary>>
34233429
) ->

0 commit comments

Comments
 (0)