Commit 62155df0 authored by Lev Walkin's avatar Lev Walkin

add stack overflow protection for SEQUENCE and SEQUENCE OF

parent 3c37385d
......@@ -95,10 +95,11 @@ SEQUENCE_decode_oer(const asn_codec_ctx_t *opt_codec_ctx,
asn_struct_ctx_t *ctx; /* Decoder context */
size_t consumed_myself = 0; /* Consumed bytes from ptr. */
(void)opt_codec_ctx;
(void)constraints;
if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx))
ASN__DECODE_FAILED;
/*
* Create the target structure if it is not present already.
*/
......
/*-
/*
* Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>.
* All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
......
/*-
* Copyright (c) 2003, 2004, 2005 Lev Walkin <vlm@lionet.info>.
/*
* Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>.
* All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
......
......@@ -117,9 +117,11 @@ SET_OF_decode_oer(const asn_codec_ctx_t *opt_codec_ctx,
asn_struct_ctx_t *ctx; /* Decoder context */
size_t consumed_myself = 0; /* Consumed bytes from ptr. */
(void)opt_codec_ctx;
(void)constraints;
if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx))
ASN__DECODE_FAILED;
/*
* Create the target structure if it is not present already.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment