diff options
author | Raimo Niskanen <[email protected]> | 2018-12-06 10:47:46 +0100 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2018-12-06 10:47:46 +0100 |
commit | 63e436ae75584c885e4c66c08d5f33c68f67e69e (patch) | |
tree | 5b0eced511bd433f64278183755fbdcab7f3269a /lib/asn1/c_src | |
parent | cd4a7568315a50822fca79239ce04adbdc1774ae (diff) | |
parent | 7c79f91fd5878c31c302015f5fc7fec51e4e7977 (diff) | |
download | otp-63e436ae75584c885e4c66c08d5f33c68f67e69e.tar.gz otp-63e436ae75584c885e4c66c08d5f33c68f67e69e.tar.bz2 otp-63e436ae75584c885e4c66c08d5f33c68f67e69e.zip |
Merge branch 'kenneth/asn1/ERIERL-278/OTP-15470' into maint
* 'kenneth/asn1/ERIERL-278/OTP-15470' of git-server:kenneth_otp:
Handle erroneous length during decode (BER only) without crashing
Diffstat (limited to 'lib/asn1/c_src')
-rw-r--r-- | lib/asn1/c_src/asn1_erl_nif.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/asn1/c_src/asn1_erl_nif.c b/lib/asn1/c_src/asn1_erl_nif.c index 797be6d4f8..da43af3405 100644 --- a/lib/asn1/c_src/asn1_erl_nif.c +++ b/lib/asn1/c_src/asn1_erl_nif.c @@ -999,7 +999,7 @@ static int ber_decode_value(ErlNifEnv* env, ERL_NIF_TERM *value, unsigned char * while (*ib_index < end_index) { if ((maybe_ret = ber_decode(env, &term, in_buf, ib_index, - *ib_index + len)) <= ASN1_ERROR + end_index )) <= ASN1_ERROR ) return maybe_ret; curr_head = enif_make_list_cell(env, term, curr_head); |