Commit 4cb49cb1 authored by Lev Walkin's avatar Lev Walkin

empty strings

parent 28eee29b
...@@ -1109,9 +1109,12 @@ OCTET_STRING__decode_xer(asn_codec_ctx_t *opt_codec_ctx, ...@@ -1109,9 +1109,12 @@ OCTET_STRING__decode_xer(asn_codec_ctx_t *opt_codec_ctx,
* Create the string if does not exist. * Create the string if does not exist.
*/ */
if(!*sptr) { if(!*sptr) {
*sptr = CALLOC(1, specs->struct_size); OCTET_STRING_t *st;
if(*sptr == NULL) { (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; asn_dec_rval_t rval;
if(*sptr) FREEMEM(*sptr);
rval.code = RC_FAIL; rval.code = RC_FAIL;
rval.consumed = 0; rval.consumed = 0;
return rval; return rval;
......
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