diff options
author | Sverker Eriksson <[email protected]> | 2019-04-03 21:16:59 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2019-04-17 19:09:12 +0200 |
commit | 6465de7e3a5393a80ed0e2c63f012fd126de706f (patch) | |
tree | f85198d2afe765a8f3b7c94ed31b36830346b006 /lib/erl_interface/src/misc/ei_decode_term.c | |
parent | 46aa940b9d771c4806aacaf065c2f637474e9815 (diff) | |
download | otp-6465de7e3a5393a80ed0e2c63f012fd126de706f.tar.gz otp-6465de7e3a5393a80ed0e2c63f012fd126de706f.tar.bz2 otp-6465de7e3a5393a80ed0e2c63f012fd126de706f.zip |
erl_interface: Add bitstring and export fun support
Diffstat (limited to 'lib/erl_interface/src/misc/ei_decode_term.c')
-rw-r--r-- | lib/erl_interface/src/misc/ei_decode_term.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/erl_interface/src/misc/ei_decode_term.c b/lib/erl_interface/src/misc/ei_decode_term.c index 63a7034508..8a4f7cc30d 100644 --- a/lib/erl_interface/src/misc/ei_decode_term.c +++ b/lib/erl_interface/src/misc/ei_decode_term.c @@ -87,6 +87,14 @@ int ei_decode_ei_term(const char* buf, int* index, ei_term* term) case ERL_BINARY_EXT: term->size = get32be(s); return 0; + case ERL_BIT_BINARY_EXT: { + int bytes = get32be(s); + int last_bits = get8(s); + if (((last_bits==0) != (bytes==0)) || last_bits > 8) + return -1; + term->size = bytes; + return 0; + } case ERL_SMALL_BIG_EXT: if ((term->arity = get8(s)) != 4) return -1; sign = get8(s); |