mirror of https://gerrit.osmocom.org/asn1c
add stack overflow protection for SEQUENCE and SEQUENCE OF
This commit is contained in:
parent
3c37385d29
commit
62155df04d
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*-
|
||||
/*
|
||||
* Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>.
|
||||
* All rights reserved.
|
||||
* Redistribution and modifications are permitted subject to BSD license.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*-
|
||||
* 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.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue