| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/asn1/tasn_new.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||
| 2 | static int asn1_item_ex_combine_new(ASN1_VALUE **pval, const ASN1_ITEM *it, | - | ||||||||||||||||||
| 3 | int combine); | - | ||||||||||||||||||
| 4 | static void asn1_item_clear(ASN1_VALUE **pval, const ASN1_ITEM *it); | - | ||||||||||||||||||
| 5 | static void asn1_template_clear(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt); | - | ||||||||||||||||||
| 6 | static void asn1_primitive_clear(ASN1_VALUE **pval, const ASN1_ITEM *it); | - | ||||||||||||||||||
| 7 | - | |||||||||||||||||||
| 8 | ASN1_VALUE * | - | ||||||||||||||||||
| 9 | ASN1_item_new(const ASN1_ITEM *it) | - | ||||||||||||||||||
| 10 | { | - | ||||||||||||||||||
| 11 | ASN1_VALUE *ret = | - | ||||||||||||||||||
| 12 | ((void *)0) | - | ||||||||||||||||||
| 13 | ; | - | ||||||||||||||||||
| 14 | if (ASN1_item_ex_new(&ret, it) > 0
| 0-3832 | ||||||||||||||||||
| 15 | return executed 3832 times by 12 tests: ret;return ret;Executed by:
executed 3832 times by 12 tests: return ret;Executed by:
| 3832 | ||||||||||||||||||
| 16 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
| 17 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
| 18 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
| 19 | } | - | ||||||||||||||||||
| 20 | - | |||||||||||||||||||
| 21 | - | |||||||||||||||||||
| 22 | - | |||||||||||||||||||
| 23 | int | - | ||||||||||||||||||
| 24 | ASN1_item_ex_new(ASN1_VALUE **pval, const ASN1_ITEM *it) | - | ||||||||||||||||||
| 25 | { | - | ||||||||||||||||||
| 26 | return executed 7415 times by 12 tests: asn1_item_ex_combine_new(pval, it, 0);return asn1_item_ex_combine_new(pval, it, 0);Executed by:
executed 7415 times by 12 tests: return asn1_item_ex_combine_new(pval, it, 0);Executed by:
| 7415 | ||||||||||||||||||
| 27 | } | - | ||||||||||||||||||
| 28 | - | |||||||||||||||||||
| 29 | static int | - | ||||||||||||||||||
| 30 | asn1_item_ex_combine_new(ASN1_VALUE **pval, const ASN1_ITEM *it, int combine) | - | ||||||||||||||||||
| 31 | { | - | ||||||||||||||||||
| 32 | const ASN1_TEMPLATE *tt = | - | ||||||||||||||||||
| 33 | ((void *)0) | - | ||||||||||||||||||
| 34 | ; | - | ||||||||||||||||||
| 35 | const ASN1_EXTERN_FUNCS *ef; | - | ||||||||||||||||||
| 36 | const ASN1_AUX *aux = it->funcs; | - | ||||||||||||||||||
| 37 | ASN1_aux_cb *asn1_cb = | - | ||||||||||||||||||
| 38 | ((void *)0) | - | ||||||||||||||||||
| 39 | ; | - | ||||||||||||||||||
| 40 | ASN1_VALUE **pseqval; | - | ||||||||||||||||||
| 41 | int i; | - | ||||||||||||||||||
| 42 | - | |||||||||||||||||||
| 43 | if (aux !=
| 2919-18788 | ||||||||||||||||||
| 44 | ((void *)0)
| 2919-18788 | ||||||||||||||||||
| 45 | && aux->asn1_cb !=
| 782-2137 | ||||||||||||||||||
| 46 | ((void *)0)
| 782-2137 | ||||||||||||||||||
| 47 | ) | - | ||||||||||||||||||
| 48 | asn1_cb = aux->asn1_cb; executed 2137 times by 9 tests: asn1_cb = aux->asn1_cb;Executed by:
| 2137 | ||||||||||||||||||
| 49 | - | |||||||||||||||||||
| 50 | if (!combine
| 16-21691 | ||||||||||||||||||
| 51 | * executed 21691 times by 12 tests: pval = *pval = ((void *)0) ;Executed by:
executed 21691 times by 12 tests: *pval = ((void *)0) ;Executed by:
| 21691 | ||||||||||||||||||
| 52 | ((void *)0) executed 21691 times by 12 tests: *pval = ((void *)0) ;Executed by:
| 21691 | ||||||||||||||||||
| 53 | ; executed 21691 times by 12 tests: *pval = ((void *)0) ;Executed by:
| 21691 | ||||||||||||||||||
| 54 | - | |||||||||||||||||||
| 55 | - | |||||||||||||||||||
| 56 | - | |||||||||||||||||||
| 57 | - | |||||||||||||||||||
| 58 | - | |||||||||||||||||||
| 59 | - | |||||||||||||||||||
| 60 | switch (it->itype) { | - | ||||||||||||||||||
| 61 | case executed 531 times by 8 tests: 0x4:case 0x4:Executed by:
executed 531 times by 8 tests: case 0x4:Executed by:
| 531 | ||||||||||||||||||
| 62 | ef = it->funcs; | - | ||||||||||||||||||
| 63 | if (ef
| 0-531 | ||||||||||||||||||
| 64 | if (!ef->asn1_ex_new(pval, it)
| 0-531 | ||||||||||||||||||
| 65 | goto never executed: memerr;goto memerr;never executed: goto memerr; | 0 | ||||||||||||||||||
| 66 | } executed 531 times by 8 tests: end of blockExecuted by:
| 531 | ||||||||||||||||||
| 67 | break; executed 531 times by 8 tests: break;Executed by:
| 531 | ||||||||||||||||||
| 68 | - | |||||||||||||||||||
| 69 | case executed 9258 times by 12 tests: 0x0:case 0x0:Executed by:
executed 9258 times by 12 tests: case 0x0:Executed by:
| 9258 | ||||||||||||||||||
| 70 | if (it->templates
| 0-9258 | ||||||||||||||||||
| 71 | if (!ASN1_template_new(pval, it->templates)
| 0 | ||||||||||||||||||
| 72 | goto never executed: memerr;goto memerr;never executed: goto memerr; | 0 | ||||||||||||||||||
| 73 | } never executed: else if (!ASN1_primitive_new(pval, it)end of block
| 0-9258 | ||||||||||||||||||
| 74 | goto never executed: memerr;goto memerr;never executed: goto memerr; | 0 | ||||||||||||||||||
| 75 | break; executed 9258 times by 12 tests: break;Executed by:
| 9258 | ||||||||||||||||||
| 76 | - | |||||||||||||||||||
| 77 | case executed 4265 times by 10 tests: 0x5:case 0x5:Executed by:
executed 4265 times by 10 tests: case 0x5:Executed by:
| 4265 | ||||||||||||||||||
| 78 | if (!ASN1_primitive_new(pval, it)
| 0-4265 | ||||||||||||||||||
| 79 | goto never executed: memerr;goto memerr;never executed: goto memerr; | 0 | ||||||||||||||||||
| 80 | break; executed 4265 times by 10 tests: break;Executed by:
| 4265 | ||||||||||||||||||
| 81 | - | |||||||||||||||||||
| 82 | case executed 64 times by 2 tests: 0x2:case 0x2:Executed by:
executed 64 times by 2 tests: case 0x2:Executed by:
| 64 | ||||||||||||||||||
| 83 | if (asn1_cb
| 0-64 | ||||||||||||||||||
| 84 | i = asn1_cb(0, pval, it, | - | ||||||||||||||||||
| 85 | ((void *)0) | - | ||||||||||||||||||
| 86 | ); | - | ||||||||||||||||||
| 87 | if (!i
| 0 | ||||||||||||||||||
| 88 | goto never executed: auxerr;goto auxerr;never executed: goto auxerr; | 0 | ||||||||||||||||||
| 89 | if (i == 2
| 0 | ||||||||||||||||||
| 90 | - | |||||||||||||||||||
| 91 | - | |||||||||||||||||||
| 92 | - | |||||||||||||||||||
| 93 | - | |||||||||||||||||||
| 94 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||
| 95 | } | - | ||||||||||||||||||
| 96 | } never executed: end of block | 0 | ||||||||||||||||||
| 97 | if (!combine
| 16-48 | ||||||||||||||||||
| 98 | *pval = calloc(1, it->size); | - | ||||||||||||||||||
| 99 | if (!*pval
| 0-48 | ||||||||||||||||||
| 100 | goto never executed: memerr;goto memerr;never executed: goto memerr; | 0 | ||||||||||||||||||
| 101 | } executed 48 times by 1 test: end of blockExecuted by:
| 48 | ||||||||||||||||||
| 102 | asn1_set_choice_selector(pval, -1, it); | - | ||||||||||||||||||
| 103 | if (asn1_cb
| 0-64 | ||||||||||||||||||
| 104 | ((void *)0)
| 0 | ||||||||||||||||||
| 105 | )
| 0 | ||||||||||||||||||
| 106 | goto never executed: auxerr;goto auxerr;never executed: goto auxerr; | 0 | ||||||||||||||||||
| 107 | break; executed 64 times by 2 tests: break;Executed by:
| 64 | ||||||||||||||||||
| 108 | - | |||||||||||||||||||
| 109 | case executed 20 times by 1 test: 0x6:case 0x6:Executed by:
executed 20 times by 1 test: case 0x6:Executed by:
| 20 | ||||||||||||||||||
| 110 | case executed 7569 times by 10 tests: 0x1:case 0x1:Executed by:
executed 7569 times by 10 tests: case 0x1:Executed by:
| 7569 | ||||||||||||||||||
| 111 | if (asn1_cb
| 921-6668 | ||||||||||||||||||
| 112 | i = asn1_cb(0, pval, it, | - | ||||||||||||||||||
| 113 | ((void *)0) | - | ||||||||||||||||||
| 114 | ); | - | ||||||||||||||||||
| 115 | if (!i
| 0-921 | ||||||||||||||||||
| 116 | goto never executed: auxerr;goto auxerr;never executed: goto auxerr; | 0 | ||||||||||||||||||
| 117 | if (i == 2
| 396-525 | ||||||||||||||||||
| 118 | - | |||||||||||||||||||
| 119 | - | |||||||||||||||||||
| 120 | - | |||||||||||||||||||
| 121 | - | |||||||||||||||||||
| 122 | return executed 396 times by 5 tests: 1;return 1;Executed by:
executed 396 times by 5 tests: return 1;Executed by:
| 396 | ||||||||||||||||||
| 123 | } | - | ||||||||||||||||||
| 124 | } executed 525 times by 8 tests: end of blockExecuted by:
| 525 | ||||||||||||||||||
| 125 | if (!combine
| 0-7193 | ||||||||||||||||||
| 126 | *pval = calloc(1, it->size); | - | ||||||||||||||||||
| 127 | if (!*pval
| 0-7193 | ||||||||||||||||||
| 128 | goto never executed: memerr;goto memerr;never executed: goto memerr; | 0 | ||||||||||||||||||
| 129 | asn1_do_lock(pval, 0, it); | - | ||||||||||||||||||
| 130 | asn1_enc_init(pval, it); | - | ||||||||||||||||||
| 131 | } executed 7193 times by 10 tests: end of blockExecuted by:
| 7193 | ||||||||||||||||||
| 132 | for (i = 0, tt = it->templates; i < it->tcount
| 7193-17502 | ||||||||||||||||||
| 133 | pseqval = asn1_get_field_ptr(pval, tt); | - | ||||||||||||||||||
| 134 | if (!ASN1_template_new(pseqval, tt)
| 0-17502 | ||||||||||||||||||
| 135 | goto never executed: memerr;goto memerr;never executed: goto memerr; | 0 | ||||||||||||||||||
| 136 | } executed 17502 times by 10 tests: end of blockExecuted by:
| 17502 | ||||||||||||||||||
| 137 | if (asn1_cb
| 0-6668 | ||||||||||||||||||
| 138 | ((void *)0)
| 0-525 | ||||||||||||||||||
| 139 | )
| 0-525 | ||||||||||||||||||
| 140 | goto never executed: auxerr;goto auxerr;never executed: goto auxerr; | 0 | ||||||||||||||||||
| 141 | break; executed 7193 times by 10 tests: break;Executed by:
| 7193 | ||||||||||||||||||
| 142 | } | - | ||||||||||||||||||
| 143 | - | |||||||||||||||||||
| 144 | - | |||||||||||||||||||
| 145 | - | |||||||||||||||||||
| 146 | - | |||||||||||||||||||
| 147 | return executed 21311 times by 12 tests: 1;return 1;Executed by:
executed 21311 times by 12 tests: return 1;Executed by:
| 21311 | ||||||||||||||||||
| 148 | - | |||||||||||||||||||
| 149 | memerr: | - | ||||||||||||||||||
| 150 | ERR_put_error(13,(0xfff),((1|64)),__FILE__,193); | - | ||||||||||||||||||
| 151 | - | |||||||||||||||||||
| 152 | - | |||||||||||||||||||
| 153 | - | |||||||||||||||||||
| 154 | - | |||||||||||||||||||
| 155 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||
| 156 | - | |||||||||||||||||||
| 157 | auxerr: | - | ||||||||||||||||||
| 158 | ERR_put_error(13,(0xfff),(100),__FILE__,201); | - | ||||||||||||||||||
| 159 | ASN1_item_ex_free(pval, it); | - | ||||||||||||||||||
| 160 | - | |||||||||||||||||||
| 161 | - | |||||||||||||||||||
| 162 | - | |||||||||||||||||||
| 163 | - | |||||||||||||||||||
| 164 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||
| 165 | - | |||||||||||||||||||
| 166 | } | - | ||||||||||||||||||
| 167 | - | |||||||||||||||||||
| 168 | static void | - | ||||||||||||||||||
| 169 | asn1_item_clear(ASN1_VALUE **pval, const ASN1_ITEM *it) | - | ||||||||||||||||||
| 170 | { | - | ||||||||||||||||||
| 171 | const ASN1_EXTERN_FUNCS *ef; | - | ||||||||||||||||||
| 172 | - | |||||||||||||||||||
| 173 | switch (it->itype) { | - | ||||||||||||||||||
| 174 | case never executed: 0x4:case 0x4:never executed: case 0x4: | 0 | ||||||||||||||||||
| 175 | ef = it->funcs; | - | ||||||||||||||||||
| 176 | if (ef
| 0 | ||||||||||||||||||
| 177 | ef->asn1_ex_clear(pval, it); never executed: ef->asn1_ex_clear(pval, it); | 0 | ||||||||||||||||||
| 178 | else | - | ||||||||||||||||||
| 179 | * never executed: pval = *pval = ((void *)0) ;never executed: *pval = ((void *)0) ; | 0 | ||||||||||||||||||
| 180 | ((void *)0) never executed: *pval = ((void *)0) ; | 0 | ||||||||||||||||||
| 181 | ; never executed: *pval = ((void *)0) ; | 0 | ||||||||||||||||||
| 182 | break; never executed: break; | 0 | ||||||||||||||||||
| 183 | - | |||||||||||||||||||
| 184 | case executed 2843 times by 8 tests: 0x0:case 0x0:Executed by:
executed 2843 times by 8 tests: case 0x0:Executed by:
| 2843 | ||||||||||||||||||
| 185 | if (it->templates
| 0-2843 | ||||||||||||||||||
| 186 | asn1_template_clear(pval, it->templates); never executed: asn1_template_clear(pval, it->templates); | 0 | ||||||||||||||||||
| 187 | else | - | ||||||||||||||||||
| 188 | asn1_primitive_clear(pval, it); executed 2843 times by 8 tests: asn1_primitive_clear(pval, it);Executed by:
| 2843 | ||||||||||||||||||
| 189 | break; executed 2843 times by 8 tests: break;Executed by:
| 2843 | ||||||||||||||||||
| 190 | - | |||||||||||||||||||
| 191 | case never executed: 0x5:case 0x5:never executed: case 0x5: | 0 | ||||||||||||||||||
| 192 | asn1_primitive_clear(pval, it); | - | ||||||||||||||||||
| 193 | break; never executed: break; | 0 | ||||||||||||||||||
| 194 | - | |||||||||||||||||||
| 195 | case never executed: 0x2:case 0x2:never executed: case 0x2: | 0 | ||||||||||||||||||
| 196 | case never executed: 0x1:case 0x1:never executed: case 0x1: | 0 | ||||||||||||||||||
| 197 | case never executed: 0x6:case 0x6:never executed: case 0x6: | 0 | ||||||||||||||||||
| 198 | *pval = | - | ||||||||||||||||||
| 199 | ((void *)0) | - | ||||||||||||||||||
| 200 | ; | - | ||||||||||||||||||
| 201 | break; never executed: break; | 0 | ||||||||||||||||||
| 202 | } | - | ||||||||||||||||||
| 203 | } executed 2843 times by 8 tests: end of blockExecuted by:
| 2843 | ||||||||||||||||||
| 204 | - | |||||||||||||||||||
| 205 | int | - | ||||||||||||||||||
| 206 | ASN1_template_new(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt) | - | ||||||||||||||||||
| 207 | { | - | ||||||||||||||||||
| 208 | const ASN1_ITEM *it = tt->item; | - | ||||||||||||||||||
| 209 | int ret; | - | ||||||||||||||||||
| 210 | - | |||||||||||||||||||
| 211 | if (tt->flags & (0x1)
| 3188-14314 | ||||||||||||||||||
| 212 | asn1_template_clear(pval, tt); | - | ||||||||||||||||||
| 213 | return executed 3188 times by 8 tests: 1;return 1;Executed by:
executed 3188 times by 8 tests: return 1;Executed by:
| 3188 | ||||||||||||||||||
| 214 | } | - | ||||||||||||||||||
| 215 | - | |||||||||||||||||||
| 216 | - | |||||||||||||||||||
| 217 | if (tt->flags & (0x3<<8)
| 12-14302 | ||||||||||||||||||
| 218 | *pval = | - | ||||||||||||||||||
| 219 | ((void *)0) | - | ||||||||||||||||||
| 220 | ; | - | ||||||||||||||||||
| 221 | return executed 12 times by 1 test: 1;return 1;Executed by:
executed 12 times by 1 test: return 1;Executed by:
| 12 | ||||||||||||||||||
| 222 | } | - | ||||||||||||||||||
| 223 | - | |||||||||||||||||||
| 224 | - | |||||||||||||||||||
| 225 | - | |||||||||||||||||||
| 226 | - | |||||||||||||||||||
| 227 | - | |||||||||||||||||||
| 228 | if (tt->flags & (0x3 << 1)
| 10-14292 | ||||||||||||||||||
| 229 | struct stack_st_ASN1_VALUE *skval; | - | ||||||||||||||||||
| 230 | skval = ((struct stack_st_ASN1_VALUE *)sk_new_null()); | - | ||||||||||||||||||
| 231 | if (!skval
| 0-10 | ||||||||||||||||||
| 232 | ERR_put_error(13,(0xfff),((1|64)),__FILE__,269); | - | ||||||||||||||||||
| 233 | ret = 0; | - | ||||||||||||||||||
| 234 | goto never executed: done;goto done;never executed: goto done; | 0 | ||||||||||||||||||
| 235 | } | - | ||||||||||||||||||
| 236 | *pval = (ASN1_VALUE *)skval; | - | ||||||||||||||||||
| 237 | ret = 1; | - | ||||||||||||||||||
| 238 | goto executed 10 times by 1 test: done;goto done;Executed by:
executed 10 times by 1 test: goto done;Executed by:
| 10 | ||||||||||||||||||
| 239 | } | - | ||||||||||||||||||
| 240 | - | |||||||||||||||||||
| 241 | ret = asn1_item_ex_combine_new(pval, it, tt->flags & (0x1<<10)); | - | ||||||||||||||||||
| 242 | done: code before this statement executed 14292 times by 10 tests: done:Executed by:
| 14292 | ||||||||||||||||||
| 243 | - | |||||||||||||||||||
| 244 | - | |||||||||||||||||||
| 245 | - | |||||||||||||||||||
| 246 | - | |||||||||||||||||||
| 247 | return executed 14302 times by 10 tests: ret;return ret;Executed by:
executed 14302 times by 10 tests: return ret;Executed by:
| 14302 | ||||||||||||||||||
| 248 | } | - | ||||||||||||||||||
| 249 | - | |||||||||||||||||||
| 250 | static void | - | ||||||||||||||||||
| 251 | asn1_template_clear(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt) | - | ||||||||||||||||||
| 252 | { | - | ||||||||||||||||||
| 253 | - | |||||||||||||||||||
| 254 | if (tt->flags & ((0x3<<8)|(0x3 << 1))
| 345-2843 | ||||||||||||||||||
| 255 | * executed 345 times by 8 tests: pval = *pval = ((void *)0) ;Executed by:
executed 345 times by 8 tests: *pval = ((void *)0) ;Executed by:
| 345 | ||||||||||||||||||
| 256 | ((void *)0) executed 345 times by 8 tests: *pval = ((void *)0) ;Executed by:
| 345 | ||||||||||||||||||
| 257 | ; executed 345 times by 8 tests: *pval = ((void *)0) ;Executed by:
| 345 | ||||||||||||||||||
| 258 | else | - | ||||||||||||||||||
| 259 | asn1_item_clear(pval, tt->item); executed 2843 times by 8 tests: asn1_item_clear(pval, tt->item);Executed by:
| 2843 | ||||||||||||||||||
| 260 | } | - | ||||||||||||||||||
| 261 | - | |||||||||||||||||||
| 262 | - | |||||||||||||||||||
| 263 | - | |||||||||||||||||||
| 264 | - | |||||||||||||||||||
| 265 | - | |||||||||||||||||||
| 266 | - | |||||||||||||||||||
| 267 | int | - | ||||||||||||||||||
| 268 | ASN1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it) | - | ||||||||||||||||||
| 269 | { | - | ||||||||||||||||||
| 270 | ASN1_TYPE *typ; | - | ||||||||||||||||||
| 271 | ASN1_STRING *str; | - | ||||||||||||||||||
| 272 | int utype; | - | ||||||||||||||||||
| 273 | - | |||||||||||||||||||
| 274 | if (it
| 0-13523 | ||||||||||||||||||
| 275 | const ASN1_PRIMITIVE_FUNCS *pf = it->funcs; | - | ||||||||||||||||||
| 276 | if (pf->prim_new
| 0-1216 | ||||||||||||||||||
| 277 | return executed 1216 times by 1 test: pf->prim_new(pval, it);return pf->prim_new(pval, it);Executed by:
executed 1216 times by 1 test: return pf->prim_new(pval, it);Executed by:
| 1216 | ||||||||||||||||||
| 278 | } never executed: end of block | 0 | ||||||||||||||||||
| 279 | - | |||||||||||||||||||
| 280 | if (!it
| 0-12307 | ||||||||||||||||||
| 281 | utype = -1; executed 4265 times by 10 tests: utype = -1;Executed by:
| 4265 | ||||||||||||||||||
| 282 | else | - | ||||||||||||||||||
| 283 | utype = it->utype; executed 8042 times by 11 tests: utype = it->utype;Executed by:
| 8042 | ||||||||||||||||||
| 284 | switch (utype) { | - | ||||||||||||||||||
| 285 | case executed 5281 times by 8 tests: 6:case 6:Executed by:
executed 5281 times by 8 tests: case 6:Executed by:
| 5281 | ||||||||||||||||||
| 286 | *pval = (ASN1_VALUE *)OBJ_nid2obj(0); | - | ||||||||||||||||||
| 287 | return executed 5281 times by 8 tests: 1;return 1;Executed by:
executed 5281 times by 8 tests: return 1;Executed by:
| 5281 | ||||||||||||||||||
| 288 | - | |||||||||||||||||||
| 289 | case never executed: 1:case 1:never executed: case 1: | 0 | ||||||||||||||||||
| 290 | *(ASN1_BOOLEAN *)pval = it->size; | - | ||||||||||||||||||
| 291 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||
| 292 | - | |||||||||||||||||||
| 293 | case never executed: 5:case 5:never executed: case 5: | 0 | ||||||||||||||||||
| 294 | *pval = (ASN1_VALUE *)1; | - | ||||||||||||||||||
| 295 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||
| 296 | - | |||||||||||||||||||
| 297 | case executed 700 times by 7 tests: -4:case -4:Executed by:
executed 700 times by 7 tests: case -4:Executed by:
| 700 | ||||||||||||||||||
| 298 | typ = malloc(sizeof(ASN1_TYPE)); | - | ||||||||||||||||||
| 299 | if (typ !=
| 0-700 | ||||||||||||||||||
| 300 | ((void *)0)
| 0-700 | ||||||||||||||||||
| 301 | ) { | - | ||||||||||||||||||
| 302 | typ->value.ptr = | - | ||||||||||||||||||
| 303 | ((void *)0) | - | ||||||||||||||||||
| 304 | ; | - | ||||||||||||||||||
| 305 | typ->type = -1; | - | ||||||||||||||||||
| 306 | } executed 700 times by 7 tests: end of blockExecuted by:
| 700 | ||||||||||||||||||
| 307 | *pval = (ASN1_VALUE *)typ; | - | ||||||||||||||||||
| 308 | break; executed 700 times by 7 tests: break;Executed by:
| 700 | ||||||||||||||||||
| 309 | - | |||||||||||||||||||
| 310 | default executed 6326 times by 11 tests: :default:Executed by:
executed 6326 times by 11 tests: default:Executed by:
| 6326 | ||||||||||||||||||
| 311 | str = ASN1_STRING_type_new(utype); | - | ||||||||||||||||||
| 312 | if (it !=
| 0-6326 | ||||||||||||||||||
| 313 | ((void *)0)
| 0-6326 | ||||||||||||||||||
| 314 | && it->itype == 0x5
| 2061-4265 | ||||||||||||||||||
| 315 | str !=
| 0-4265 | ||||||||||||||||||
| 316 | ((void *)0)
| 0-4265 | ||||||||||||||||||
| 317 | ) | - | ||||||||||||||||||
| 318 | str->flags |= 0x040; executed 4265 times by 10 tests: str->flags |= 0x040;Executed by:
| 4265 | ||||||||||||||||||
| 319 | *pval = (ASN1_VALUE *)str; | - | ||||||||||||||||||
| 320 | break; executed 6326 times by 11 tests: break;Executed by:
| 6326 | ||||||||||||||||||
| 321 | } | - | ||||||||||||||||||
| 322 | if (*
| 0-7026 | ||||||||||||||||||
| 323 | return executed 7026 times by 11 tests: 1;return 1;Executed by:
executed 7026 times by 11 tests: return 1;Executed by:
| 7026 | ||||||||||||||||||
| 324 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||
| 325 | } | - | ||||||||||||||||||
| 326 | - | |||||||||||||||||||
| 327 | static void | - | ||||||||||||||||||
| 328 | asn1_primitive_clear(ASN1_VALUE **pval, const ASN1_ITEM *it) | - | ||||||||||||||||||
| 329 | { | - | ||||||||||||||||||
| 330 | int utype; | - | ||||||||||||||||||
| 331 | if (it
| 0-2843 | ||||||||||||||||||
| 332 | const ASN1_PRIMITIVE_FUNCS *pf = it->funcs; | - | ||||||||||||||||||
| 333 | if (pf->prim_clear
| 0 | ||||||||||||||||||
| 334 | pf->prim_clear(pval, it); never executed: pf->prim_clear(pval, it); | 0 | ||||||||||||||||||
| 335 | else | - | ||||||||||||||||||
| 336 | * never executed: pval = *pval = ((void *)0) ;never executed: *pval = ((void *)0) ; | 0 | ||||||||||||||||||
| 337 | ((void *)0) never executed: *pval = ((void *)0) ; | 0 | ||||||||||||||||||
| 338 | ; never executed: *pval = ((void *)0) ; | 0 | ||||||||||||||||||
| 339 | return; never executed: return; | 0 | ||||||||||||||||||
| 340 | } | - | ||||||||||||||||||
| 341 | if (!it
| 0-2843 | ||||||||||||||||||
| 342 | utype = -1; never executed: utype = -1; | 0 | ||||||||||||||||||
| 343 | else | - | ||||||||||||||||||
| 344 | utype = it->utype; executed 2843 times by 8 tests: utype = it->utype;Executed by:
| 2843 | ||||||||||||||||||
| 345 | if (utype == 1
| 945-1898 | ||||||||||||||||||
| 346 | *( executed 945 times by 8 tests: ASN1_BOOLEAN *)pval = it->size;*(ASN1_BOOLEAN *)pval = it->size;Executed by:
executed 945 times by 8 tests: *(ASN1_BOOLEAN *)pval = it->size;Executed by:
| 945 | ||||||||||||||||||
| 347 | else | - | ||||||||||||||||||
| 348 | * executed 1898 times by 8 tests: pval = *pval = ((void *)0) ;Executed by:
executed 1898 times by 8 tests: *pval = ((void *)0) ;Executed by:
| 1898 | ||||||||||||||||||
| 349 | ((void *)0) executed 1898 times by 8 tests: *pval = ((void *)0) ;Executed by:
| 1898 | ||||||||||||||||||
| 350 | ; executed 1898 times by 8 tests: *pval = ((void *)0) ;Executed by:
| 1898 | ||||||||||||||||||
| 351 | } | - | ||||||||||||||||||
| Switch to Source code | Preprocessed file |