diff options
author | Lev Walkin <vlm@lionet.info> | 2004-10-23 10:20:27 +0000 |
---|---|---|
committer | Lev Walkin <vlm@lionet.info> | 2004-10-23 10:20:27 +0000 |
commit | 4cb49cb1ef4a2e1fb91b2d8564dcd5a6abd3217e (patch) | |
tree | 90dc2669ed4e46847fd113c2a227d20844f21fb3 | |
parent | 28eee29b1434138c5c4e27aeb2319a77308ef7d7 (diff) |
empty strings
-rw-r--r-- | skeletons/OCTET_STRING.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/skeletons/OCTET_STRING.c b/skeletons/OCTET_STRING.c index 16d3a895..89d5de0b 100644 --- a/skeletons/OCTET_STRING.c +++ b/skeletons/OCTET_STRING.c @@ -1109,9 +1109,12 @@ OCTET_STRING__decode_xer(asn_codec_ctx_t *opt_codec_ctx, * Create the string if does not exist. */ if(!*sptr) { - *sptr = CALLOC(1, specs->struct_size); - if(*sptr == NULL) { + OCTET_STRING_t *st; + (void *)st = *sptr = CALLOC(1, specs->struct_size); + if(st) st->buf = (uint8_t *)CALLOC(1, 1); + if(!*sptr || !st->buf) { asn_dec_rval_t rval; + if(*sptr) FREEMEM(*sptr); rval.code = RC_FAIL; rval.consumed = 0; return rval; |