Skip to content
Snippets Groups Projects
Commit 4cb49cb1 authored by Lev Walkin's avatar Lev Walkin
Browse files

empty strings

parent 28eee29b
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment