… | |
… | |
584 | } |
584 | } |
585 | |
585 | |
586 | static SV * |
586 | static SV * |
587 | encode_cbor (SV *scalar, CBOR *cbor) |
587 | encode_cbor (SV *scalar, CBOR *cbor) |
588 | { |
588 | { |
589 | enc_t enc = { }; |
589 | enc_t enc = { 0 }; |
590 | |
590 | |
591 | enc.cbor = *cbor; |
591 | enc.cbor = *cbor; |
592 | enc.sv = sv_2mortal (NEWSV (0, INIT_SIZE)); |
592 | enc.sv = sv_2mortal (NEWSV (0, INIT_SIZE)); |
593 | enc.cur = SvPVX (enc.sv); |
593 | enc.cur = SvPVX (enc.sv); |
594 | enc.end = SvEND (enc.sv); |
594 | enc.end = SvEND (enc.sv); |
… | |
… | |
1163 | } |
1163 | } |
1164 | |
1164 | |
1165 | static SV * |
1165 | static SV * |
1166 | decode_cbor (SV *string, CBOR *cbor, char **offset_return) |
1166 | decode_cbor (SV *string, CBOR *cbor, char **offset_return) |
1167 | { |
1167 | { |
1168 | dec_t dec = { }; |
1168 | dec_t dec = { 0 }; |
1169 | SV *sv; |
1169 | SV *sv; |
1170 | STRLEN len; |
1170 | STRLEN len; |
1171 | char *data = SvPVbyte (string, len); |
1171 | char *data = SvPVbyte (string, len); |
1172 | |
1172 | |
1173 | if (len > cbor->max_size && cbor->max_size) |
1173 | if (len > cbor->max_size && cbor->max_size) |