aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlm <vlm@59561ff5-6e30-0410-9f3c-9617f08c8826>2007-11-10 02:05:23 +0000
committervlm <vlm@59561ff5-6e30-0410-9f3c-9617f08c8826>2007-11-10 02:05:23 +0000
commit55c3274824a1c37373c30098936372d639276689 (patch)
tree63a829e260b9d65b7804760cecb87746172abb34
parentb6053b4d88be6356c34dc288bd06a4cbc21e322d (diff)
problem reported by ExtraHop networks
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1395 59561ff5-6e30-0410-9f3c-9617f08c8826
-rw-r--r--skeletons/INTEGER.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/skeletons/INTEGER.c b/skeletons/INTEGER.c
index 7fe3e84d..3a548e67 100644
--- a/skeletons/INTEGER.c
+++ b/skeletons/INTEGER.c
@@ -576,6 +576,8 @@ INTEGER_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
}
FREEMEM(st->buf);
+ st->buf = 0;
+ st->size = 0;
if(ct) {
if(ct->flags & APC_SEMI_CONSTRAINED) {
st->buf = (uint8_t *)CALLOC(1, 2);
@@ -586,11 +588,7 @@ INTEGER_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
st->buf = (uint8_t *)MALLOC(1 + size + 1);
if(!st->buf) _ASN_DECODE_FAILED;
st->size = size;
- } else {
- st->size = 0;
}
- } else {
- st->size = 0;
}
/* X.691, #12.2.2 */