crypto/x509v3/v3_bitst.c:103: error: NULL_DEREFERENCE
  pointer `null` is dereferenced by call to `X509V3_add_value()` at line 103, column 13.
Showing all 106 steps of the trace


crypto/x509v3/v3_bitst.c:96:1: start of procedure i2v_ASN1_BIT_STRING()
94.   EXT_BITSTRING(NID_key_usage, key_usage_type_table);
95.   
96. > STACK_OF(CONF_VALUE) *i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method,
97.                                             ASN1_BIT_STRING *bits,
98.                                             STACK_OF(CONF_VALUE) *ret)

crypto/x509v3/v3_bitst.c:101:10: 
99.   {
100.       BIT_STRING_BITNAME *bnam;
101. >     for (bnam = method->usr_data; bnam->lname; bnam++) {
102.           if (ASN1_BIT_STRING_get_bit(bits, bnam->bitnum))
103.               X509V3_add_value(bnam->lname, NULL, &ret);

crypto/x509v3/v3_bitst.c:101:35: Loop condition is true. Entering loop body
99.   {
100.       BIT_STRING_BITNAME *bnam;
101.       for (bnam = method->usr_data; bnam->lname; bnam++) {
                                         ^
102.           if (ASN1_BIT_STRING_get_bit(bits, bnam->bitnum))
103.               X509V3_add_value(bnam->lname, NULL, &ret);

crypto/x509v3/v3_bitst.c:102:13: 
100.       BIT_STRING_BITNAME *bnam;
101.       for (bnam = method->usr_data; bnam->lname; bnam++) {
102. >         if (ASN1_BIT_STRING_get_bit(bits, bnam->bitnum))
103.               X509V3_add_value(bnam->lname, NULL, &ret);
104.       }

crypto/asn1/a_bitstr.c:223:1: start of procedure ASN1_BIT_STRING_get_bit()
  221.   }
  222.   
  223. > int ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n)
  224.   {
  225.       int w, v;

crypto/asn1/a_bitstr.c:227:5: 
  225.       int w, v;
  226.   
  227. >     w = n / 8;
  228.       v = 1 << (7 - (n & 0x07));
  229.       if ((a == NULL) || (a->length < (w + 1)) || (a->data == NULL))

crypto/asn1/a_bitstr.c:228:5: 
  226.   
  227.       w = n / 8;
  228. >     v = 1 << (7 - (n & 0x07));
  229.       if ((a == NULL) || (a->length < (w + 1)) || (a->data == NULL))
  230.           return (0);

crypto/asn1/a_bitstr.c:229:10: Taking false branch
  227.       w = n / 8;
  228.       v = 1 << (7 - (n & 0x07));
  229.       if ((a == NULL) || (a->length < (w + 1)) || (a->data == NULL))
                  ^
  230.           return (0);
  231.       return ((a->data[w] & v) != 0);

crypto/asn1/a_bitstr.c:229:25: Taking false branch
  227.       w = n / 8;
  228.       v = 1 << (7 - (n & 0x07));
  229.       if ((a == NULL) || (a->length < (w + 1)) || (a->data == NULL))
                                 ^
  230.           return (0);
  231.       return ((a->data[w] & v) != 0);

crypto/asn1/a_bitstr.c:229:50: Taking false branch
  227.       w = n / 8;
  228.       v = 1 << (7 - (n & 0x07));
  229.       if ((a == NULL) || (a->length < (w + 1)) || (a->data == NULL))
                                                          ^
  230.           return (0);
  231.       return ((a->data[w] & v) != 0);

crypto/asn1/a_bitstr.c:231:13: Condition is true
  229.       if ((a == NULL) || (a->length < (w + 1)) || (a->data == NULL))
  230.           return (0);
  231.       return ((a->data[w] & v) != 0);
                     ^
  232.   }
  233.   

crypto/asn1/a_bitstr.c:231:5: 
  229.       if ((a == NULL) || (a->length < (w + 1)) || (a->data == NULL))
  230.           return (0);
  231. >     return ((a->data[w] & v) != 0);
  232.   }
  233.   

crypto/asn1/a_bitstr.c:232:1: return from a call to ASN1_BIT_STRING_get_bit
  230.           return (0);
  231.       return ((a->data[w] & v) != 0);
  232. > }
  233.   
  234.   /*

crypto/x509v3/v3_bitst.c:102:13: Taking true branch
100.       BIT_STRING_BITNAME *bnam;
101.       for (bnam = method->usr_data; bnam->lname; bnam++) {
102.           if (ASN1_BIT_STRING_get_bit(bits, bnam->bitnum))
                   ^
103.               X509V3_add_value(bnam->lname, NULL, &ret);
104.       }

crypto/x509v3/v3_bitst.c:103:13: 
101.       for (bnam = method->usr_data; bnam->lname; bnam++) {
102.           if (ASN1_BIT_STRING_get_bit(bits, bnam->bitnum))
103. >             X509V3_add_value(bnam->lname, NULL, &ret);
104.       }
105.       return ret;

crypto/x509v3/v3_utl.c:83:1: start of procedure X509V3_add_value()
  81.   /* Add a CONF_VALUE name value pair to stack */
  82.   
  83. > int X509V3_add_value(const char *name, const char *value,
  84.                        STACK_OF(CONF_VALUE) **extlist)
  85.   {

crypto/x509v3/v3_utl.c:86:5: 
  84.                        STACK_OF(CONF_VALUE) **extlist)
  85.   {
  86. >     CONF_VALUE *vtmp = NULL;
  87.       char *tname = NULL, *tvalue = NULL;
  88.   

crypto/x509v3/v3_utl.c:87:5: 
  85.   {
  86.       CONF_VALUE *vtmp = NULL;
  87. >     char *tname = NULL, *tvalue = NULL;
  88.   
  89.       if (name && (tname = OPENSSL_strdup(name)) == NULL)

crypto/x509v3/v3_utl.c:89:9: Taking true branch
  87.       char *tname = NULL, *tvalue = NULL;
  88.   
  89.       if (name && (tname = OPENSSL_strdup(name)) == NULL)
                ^
  90.           goto err;
  91.       if (value && (tvalue = OPENSSL_strdup(value)) == NULL)

crypto/x509v3/v3_utl.c:89:17: 
  87.       char *tname = NULL, *tvalue = NULL;
  88.   
  89. >     if (name && (tname = OPENSSL_strdup(name)) == NULL)
  90.           goto err;
  91.       if (value && (tvalue = OPENSSL_strdup(value)) == NULL)

crypto/o_str.c:121:1: start of procedure CRYPTO_strdup()
    119.   }
    120.   
    121. > char *CRYPTO_strdup(const char *str, const char* file, int line)
    122.   {
    123.       char *ret;

crypto/o_str.c:125:9: Taking false branch
    123.       char *ret;
    124.   
    125.       if (str == NULL)
                   ^
    126.           return NULL;
    127.       ret = CRYPTO_malloc(strlen(str) + 1, file, line);

crypto/o_str.c:127:5: 
    125.       if (str == NULL)
    126.           return NULL;
    127. >     ret = CRYPTO_malloc(strlen(str) + 1, file, line);
    128.       if (ret != NULL)
    129.           strcpy(ret, str);

crypto/mem.c:120:1: start of procedure CRYPTO_malloc()
      118.   }
      119.   
      120. > void *CRYPTO_malloc(size_t num, const char *file, int line)
      121.   {
      122.       void *ret = NULL;

crypto/mem.c:122:5: 
      120.   void *CRYPTO_malloc(size_t num, const char *file, int line)
      121.   {
      122. >     void *ret = NULL;
      123.   
      124.       if (num <= 0)

crypto/mem.c:124:9: Taking false branch
      122.       void *ret = NULL;
      123.   
      124.       if (num <= 0)
                     ^
      125.           return NULL;
      126.   

crypto/mem.c:127:5: 
      125.           return NULL;
      126.   
      127. >     allow_customize = 0;
      128.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
      129.       if (call_malloc_debug) {

crypto/mem.c:137:5: 
      135.       }
      136.   #else
      137. >     (void)file;
      138.       (void)line;
      139.       ret = malloc(num);

crypto/mem.c:138:5: 
      136.   #else
      137.       (void)file;
      138. >     (void)line;
      139.       ret = malloc(num);
      140.   #endif

crypto/mem.c:139:5: 
      137.       (void)file;
      138.       (void)line;
      139. >     ret = malloc(num);
      140.   #endif
      141.   

crypto/mem.c:154:5: 
      152.   #endif
      153.   
      154. >     return ret;
      155.   }
      156.   

crypto/mem.c:155:1: return from a call to CRYPTO_malloc
      153.   
      154.       return ret;
      155. > }
      156.   
      157.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/o_str.c:128:9: Taking true branch
    126.           return NULL;
    127.       ret = CRYPTO_malloc(strlen(str) + 1, file, line);
    128.       if (ret != NULL)
                   ^
    129.           strcpy(ret, str);
    130.       return ret;

crypto/o_str.c:129:9: 
    127.       ret = CRYPTO_malloc(strlen(str) + 1, file, line);
    128.       if (ret != NULL)
    129. >         strcpy(ret, str);
    130.       return ret;
    131.   }

crypto/o_str.c:130:5: 
    128.       if (ret != NULL)
    129.           strcpy(ret, str);
    130. >     return ret;
    131.   }
    132.   

crypto/o_str.c:131:1: return from a call to CRYPTO_strdup
    129.           strcpy(ret, str);
    130.       return ret;
    131. > }
    132.   
    133.   char *CRYPTO_strndup(const char *str, size_t s, const char* file, int line)

crypto/x509v3/v3_utl.c:89:17: Taking false branch
  87.       char *tname = NULL, *tvalue = NULL;
  88.   
  89.       if (name && (tname = OPENSSL_strdup(name)) == NULL)
                        ^
  90.           goto err;
  91.       if (value && (tvalue = OPENSSL_strdup(value)) == NULL)

crypto/x509v3/v3_utl.c:91:9: Taking true branch
  89.       if (name && (tname = OPENSSL_strdup(name)) == NULL)
  90.           goto err;
  91.       if (value && (tvalue = OPENSSL_strdup(value)) == NULL)
                ^
  92.           goto err;
  93.       if ((vtmp = OPENSSL_malloc(sizeof(*vtmp))) == NULL)

crypto/x509v3/v3_utl.c:91:18: 
  89.       if (name && (tname = OPENSSL_strdup(name)) == NULL)
  90.           goto err;
  91. >     if (value && (tvalue = OPENSSL_strdup(value)) == NULL)
  92.           goto err;
  93.       if ((vtmp = OPENSSL_malloc(sizeof(*vtmp))) == NULL)

crypto/o_str.c:121:1: start of procedure CRYPTO_strdup()
    119.   }
    120.   
    121. > char *CRYPTO_strdup(const char *str, const char* file, int line)
    122.   {
    123.       char *ret;

crypto/o_str.c:125:9: Taking false branch
    123.       char *ret;
    124.   
    125.       if (str == NULL)
                   ^
    126.           return NULL;
    127.       ret = CRYPTO_malloc(strlen(str) + 1, file, line);

crypto/o_str.c:127:5: 
    125.       if (str == NULL)
    126.           return NULL;
    127. >     ret = CRYPTO_malloc(strlen(str) + 1, file, line);
    128.       if (ret != NULL)
    129.           strcpy(ret, str);

crypto/mem.c:120:1: start of procedure CRYPTO_malloc()
      118.   }
      119.   
      120. > void *CRYPTO_malloc(size_t num, const char *file, int line)
      121.   {
      122.       void *ret = NULL;

crypto/mem.c:122:5: 
      120.   void *CRYPTO_malloc(size_t num, const char *file, int line)
      121.   {
      122. >     void *ret = NULL;
      123.   
      124.       if (num <= 0)

crypto/mem.c:124:9: Taking false branch
      122.       void *ret = NULL;
      123.   
      124.       if (num <= 0)
                     ^
      125.           return NULL;
      126.   

crypto/mem.c:127:5: 
      125.           return NULL;
      126.   
      127. >     allow_customize = 0;
      128.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
      129.       if (call_malloc_debug) {

crypto/mem.c:137:5: 
      135.       }
      136.   #else
      137. >     (void)file;
      138.       (void)line;
      139.       ret = malloc(num);

crypto/mem.c:138:5: 
      136.   #else
      137.       (void)file;
      138. >     (void)line;
      139.       ret = malloc(num);
      140.   #endif

crypto/mem.c:139:5: 
      137.       (void)file;
      138.       (void)line;
      139. >     ret = malloc(num);
      140.   #endif
      141.   

crypto/mem.c:154:5: 
      152.   #endif
      153.   
      154. >     return ret;
      155.   }
      156.   

crypto/mem.c:155:1: return from a call to CRYPTO_malloc
      153.   
      154.       return ret;
      155. > }
      156.   
      157.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/o_str.c:128:9: Taking true branch
    126.           return NULL;
    127.       ret = CRYPTO_malloc(strlen(str) + 1, file, line);
    128.       if (ret != NULL)
                   ^
    129.           strcpy(ret, str);
    130.       return ret;

crypto/o_str.c:129:9: 
    127.       ret = CRYPTO_malloc(strlen(str) + 1, file, line);
    128.       if (ret != NULL)
    129. >         strcpy(ret, str);
    130.       return ret;
    131.   }

crypto/o_str.c:130:5: 
    128.       if (ret != NULL)
    129.           strcpy(ret, str);
    130. >     return ret;
    131.   }
    132.   

crypto/o_str.c:131:1: return from a call to CRYPTO_strdup
    129.           strcpy(ret, str);
    130.       return ret;
    131. > }
    132.   
    133.   char *CRYPTO_strndup(const char *str, size_t s, const char* file, int line)

crypto/x509v3/v3_utl.c:91:18: Taking false branch
  89.       if (name && (tname = OPENSSL_strdup(name)) == NULL)
  90.           goto err;
  91.       if (value && (tvalue = OPENSSL_strdup(value)) == NULL)
                         ^
  92.           goto err;
  93.       if ((vtmp = OPENSSL_malloc(sizeof(*vtmp))) == NULL)

crypto/x509v3/v3_utl.c:93:9: 
  91.       if (value && (tvalue = OPENSSL_strdup(value)) == NULL)
  92.           goto err;
  93. >     if ((vtmp = OPENSSL_malloc(sizeof(*vtmp))) == NULL)
  94.           goto err;
  95.       if (*extlist == NULL && (*extlist = sk_CONF_VALUE_new_null()) == NULL)

crypto/mem.c:120:1: start of procedure CRYPTO_malloc()
    118.   }
    119.   
    120. > void *CRYPTO_malloc(size_t num, const char *file, int line)
    121.   {
    122.       void *ret = NULL;

crypto/mem.c:122:5: 
    120.   void *CRYPTO_malloc(size_t num, const char *file, int line)
    121.   {
    122. >     void *ret = NULL;
    123.   
    124.       if (num <= 0)

crypto/mem.c:124:9: Taking false branch
    122.       void *ret = NULL;
    123.   
    124.       if (num <= 0)
                   ^
    125.           return NULL;
    126.   

crypto/mem.c:127:5: 
    125.           return NULL;
    126.   
    127. >     allow_customize = 0;
    128.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
    129.       if (call_malloc_debug) {

crypto/mem.c:137:5: 
    135.       }
    136.   #else
    137. >     (void)file;
    138.       (void)line;
    139.       ret = malloc(num);

crypto/mem.c:138:5: 
    136.   #else
    137.       (void)file;
    138. >     (void)line;
    139.       ret = malloc(num);
    140.   #endif

crypto/mem.c:139:5: 
    137.       (void)file;
    138.       (void)line;
    139. >     ret = malloc(num);
    140.   #endif
    141.   

crypto/mem.c:154:5: 
    152.   #endif
    153.   
    154. >     return ret;
    155.   }
    156.   

crypto/mem.c:155:1: return from a call to CRYPTO_malloc
    153.   
    154.       return ret;
    155. > }
    156.   
    157.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/x509v3/v3_utl.c:93:9: Taking false branch
  91.       if (value && (tvalue = OPENSSL_strdup(value)) == NULL)
  92.           goto err;
  93.       if ((vtmp = OPENSSL_malloc(sizeof(*vtmp))) == NULL)
                ^
  94.           goto err;
  95.       if (*extlist == NULL && (*extlist = sk_CONF_VALUE_new_null()) == NULL)

crypto/x509v3/v3_utl.c:95:9: Taking false branch
  93.       if ((vtmp = OPENSSL_malloc(sizeof(*vtmp))) == NULL)
  94.           goto err;
  95.       if (*extlist == NULL && (*extlist = sk_CONF_VALUE_new_null()) == NULL)
                ^
  96.           goto err;
  97.       vtmp->section = NULL;

crypto/x509v3/v3_utl.c:97:5: 
  95.       if (*extlist == NULL && (*extlist = sk_CONF_VALUE_new_null()) == NULL)
  96.           goto err;
  97. >     vtmp->section = NULL;
  98.       vtmp->name = tname;
  99.       vtmp->value = tvalue;

crypto/x509v3/v3_utl.c:98:5: 
  96.           goto err;
  97.       vtmp->section = NULL;
  98. >     vtmp->name = tname;
  99.       vtmp->value = tvalue;
  100.       if (!sk_CONF_VALUE_push(*extlist, vtmp))

crypto/x509v3/v3_utl.c:99:5: 
  97.       vtmp->section = NULL;
  98.       vtmp->name = tname;
  99. >     vtmp->value = tvalue;
  100.       if (!sk_CONF_VALUE_push(*extlist, vtmp))
  101.           goto err;

crypto/x509v3/v3_utl.c:100:10: 
  98.       vtmp->name = tname;
  99.       vtmp->value = tvalue;
  100. >     if (!sk_CONF_VALUE_push(*extlist, vtmp))
  101.           goto err;
  102.       return 1;

include/openssl/conf.h:80:1: start of procedure sk_CONF_VALUE_push()
    78.   } CONF_VALUE;
    79.   
    80. > DEFINE_STACK_OF(CONF_VALUE)
    81.   DEFINE_LHASH_OF(CONF_VALUE);
    82.   

crypto/stack/stack.c:259:1: start of procedure sk_push()
      257.   }
      258.   
      259. > int sk_push(_STACK *st, void *data)
      260.   {
      261.       return (sk_insert(st, data, st->num));

crypto/stack/stack.c:261:5: 
      259.   int sk_push(_STACK *st, void *data)
      260.   {
      261. >     return (sk_insert(st, data, st->num));
      262.   }
      263.   

crypto/stack/stack.c:167:1: start of procedure sk_insert()
        165.   }
        166.   
        167. > int sk_insert(_STACK *st, void *data, int loc)
        168.   {
        169.       char **s;

crypto/stack/stack.c:171:9: Taking false branch
        169.       char **s;
        170.   
        171.       if (st == NULL)
                       ^
        172.           return 0;
        173.       if (st->num_alloc <= st->num + 1) {

crypto/stack/stack.c:173:9: Taking true branch
        171.       if (st == NULL)
        172.           return 0;
        173.       if (st->num_alloc <= st->num + 1) {
                       ^
        174.           s = OPENSSL_realloc((char *)st->data,
        175.                               (unsigned int)sizeof(char *) * st->num_alloc * 2);

crypto/stack/stack.c:174:9: 
        172.           return 0;
        173.       if (st->num_alloc <= st->num + 1) {
        174. >         s = OPENSSL_realloc((char *)st->data,
        175.                               (unsigned int)sizeof(char *) * st->num_alloc * 2);
        176.           if (s == NULL)

crypto/mem.c:166:1: start of procedure CRYPTO_realloc()
          164.   }
          165.   
          166. > void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)
          167.   {
          168.       if (str == NULL)

crypto/mem.c:168:9: Taking true branch
          166.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)
          167.   {
          168.       if (str == NULL)
                         ^
          169.           return CRYPTO_malloc(num, file, line);
          170.   

crypto/mem.c:169:9: 
          167.   {
          168.       if (str == NULL)
          169. >         return CRYPTO_malloc(num, file, line);
          170.   
          171.       if (num == 0) {

crypto/mem.c:120:1: start of procedure CRYPTO_malloc()
            118.   }
            119.   
            120. > void *CRYPTO_malloc(size_t num, const char *file, int line)
            121.   {
            122.       void *ret = NULL;

crypto/mem.c:122:5: 
            120.   void *CRYPTO_malloc(size_t num, const char *file, int line)
            121.   {
            122. >     void *ret = NULL;
            123.   
            124.       if (num <= 0)

crypto/mem.c:124:9: Taking false branch
            122.       void *ret = NULL;
            123.   
            124.       if (num <= 0)
                           ^
            125.           return NULL;
            126.   

crypto/mem.c:127:5: 
            125.           return NULL;
            126.   
            127. >     allow_customize = 0;
            128.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
            129.       if (call_malloc_debug) {

crypto/mem.c:137:5: 
            135.       }
            136.   #else
            137. >     (void)file;
            138.       (void)line;
            139.       ret = malloc(num);

crypto/mem.c:138:5: 
            136.   #else
            137.       (void)file;
            138. >     (void)line;
            139.       ret = malloc(num);
            140.   #endif

crypto/mem.c:139:5: 
            137.       (void)file;
            138.       (void)line;
            139. >     ret = malloc(num);
            140.   #endif
            141.   

crypto/mem.c:154:5: 
            152.   #endif
            153.   
            154. >     return ret;
            155.   }
            156.   

crypto/mem.c:155:1: return from a call to CRYPTO_malloc
            153.   
            154.       return ret;
            155. > }
            156.   
            157.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:191:1: return from a call to CRYPTO_realloc
          189.       return realloc(str, num);
          190.   
          191. > }
          192.   
          193.   void *CRYPTO_clear_realloc(void *str, size_t old_len, size_t num,

crypto/stack/stack.c:176:13: Taking false branch
        174.           s = OPENSSL_realloc((char *)st->data,
        175.                               (unsigned int)sizeof(char *) * st->num_alloc * 2);
        176.           if (s == NULL)
                           ^
        177.               return (0);
        178.           st->data = s;

crypto/stack/stack.c:178:9: 
        176.           if (s == NULL)
        177.               return (0);
        178. >         st->data = s;
        179.           st->num_alloc *= 2;
        180.       }

crypto/stack/stack.c:179:9: 
        177.               return (0);
        178.           st->data = s;
        179. >         st->num_alloc *= 2;
        180.       }
        181.       if ((loc >= (int)st->num) || (loc < 0))

crypto/stack/stack.c:181:10: Taking true branch
        179.           st->num_alloc *= 2;
        180.       }
        181.       if ((loc >= (int)st->num) || (loc < 0))
                        ^
        182.           st->data[st->num] = data;
        183.       else {

crypto/stack/stack.c:182:9: 
        180.       }
        181.       if ((loc >= (int)st->num) || (loc < 0))
        182. >         st->data[st->num] = data;
        183.       else {
        184.           memmove(&(st->data[loc + 1]),

crypto/stack/stack.c:188:5: 
        186.           st->data[loc] = data;
        187.       }
        188. >     st->num++;
        189.       st->sorted = 0;
        190.       return (st->num);

crypto/stack/stack.c:189:5: 
        187.       }
        188.       st->num++;
        189. >     st->sorted = 0;
        190.       return (st->num);
        191.   }

crypto/stack/stack.c:190:5: 
        188.       st->num++;
        189.       st->sorted = 0;
        190. >     return (st->num);
        191.   }
        192.   

crypto/stack/stack.c:191:1: return from a call to sk_insert
        189.       st->sorted = 0;
        190.       return (st->num);
        191. > }
        192.   
        193.   void *sk_delete_ptr(_STACK *st, void *p)

crypto/stack/stack.c:262:1: return from a call to sk_push
      260.   {
      261.       return (sk_insert(st, data, st->num));
      262. > }
      263.   
      264.   int sk_unshift(_STACK *st, void *data)

include/openssl/conf.h:80:1: return from a call to sk_CONF_VALUE_push
    78.   } CONF_VALUE;
    79.   
    80. > DEFINE_STACK_OF(CONF_VALUE)
    81.   DEFINE_LHASH_OF(CONF_VALUE);
    82.   

crypto/x509v3/v3_utl.c:100:10: Taking false branch
  98.       vtmp->name = tname;
  99.       vtmp->value = tvalue;
  100.       if (!sk_CONF_VALUE_push(*extlist, vtmp))
                  ^
  101.           goto err;
  102.       return 1;

crypto/x509v3/v3_utl.c:102:5: 
  100.       if (!sk_CONF_VALUE_push(*extlist, vtmp))
  101.           goto err;
  102. >     return 1;
  103.    err:
  104.       X509V3err(X509V3_F_X509V3_ADD_VALUE, ERR_R_MALLOC_FAILURE);

crypto/x509v3/v3_utl.c:109:1: return from a call to X509V3_add_value
  107.       OPENSSL_free(tvalue);
  108.       return 0;
  109. > }
  110.   
  111.   int X509V3_add_value_uchar(const char *name, const unsigned char *value,

STACK_OF(CONF_VALUE) *i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method,
                                          ASN1_BIT_STRING *bits,
                                          STACK_OF(CONF_VALUE) *ret)
{
    BIT_STRING_BITNAME *bnam;
    for (bnam = method->usr_data; bnam->lname; bnam++) {
        if (ASN1_BIT_STRING_get_bit(bits, bnam->bitnum))
            X509V3_add_value(bnam->lname, NULL, &ret);
    }
    return ret;
}
['STACK_OF(CONF_VALUE) *i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method,\n                                          ASN1_BIT_STRING *bits,\n                                          STACK_OF(CONF_VALUE) *ret)\n{\n    BIT_STRING_BITNAME *bnam;\n    for (bnam = method->usr_data; bnam->lname; bnam++) {\n        if (ASN1_BIT_STRING_get_bit(bits, bnam->bitnum))\n            X509V3_add_value(bnam->lname, NULL, &ret);\n    }\n    return ret;\n}', 'int ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n)\n{\n    int w, v;\n    w = n / 8;\n    v = 1 << (7 - (n & 0x07));\n    if ((a == NULL) || (a->length < (w + 1)) || (a->data == NULL))\n        return (0);\n    return ((a->data[w] & v) != 0);\n}', 'int X509V3_add_value(const char *name, const char *value,\n                     STACK_OF(CONF_VALUE) **extlist)\n{\n    CONF_VALUE *vtmp = NULL;\n    char *tname = NULL, *tvalue = NULL;\n    if (name && (tname = OPENSSL_strdup(name)) == NULL)\n        goto err;\n    if (value && (tvalue = OPENSSL_strdup(value)) == NULL)\n        goto err;\n    if ((vtmp = OPENSSL_malloc(sizeof(*vtmp))) == NULL)\n        goto err;\n    if (*extlist == NULL && (*extlist = sk_CONF_VALUE_new_null()) == NULL)\n        goto err;\n    vtmp->section = NULL;\n    vtmp->name = tname;\n    vtmp->value = tvalue;\n    if (!sk_CONF_VALUE_push(*extlist, vtmp))\n        goto err;\n    return 1;\n err:\n    X509V3err(X509V3_F_X509V3_ADD_VALUE, ERR_R_MALLOC_FAILURE);\n    OPENSSL_free(vtmp);\n    OPENSSL_free(tname);\n    OPENSSL_free(tvalue);\n    return 0;\n}', 'char *CRYPTO_strdup(const char *str, const char* file, int line)\n{\n    char *ret;\n    if (str == NULL)\n        return NULL;\n    ret = CRYPTO_malloc(strlen(str) + 1, file, line);\n    if (ret != NULL)\n        strcpy(ret, str);\n    return ret;\n}', 'void *CRYPTO_malloc(size_t num, const char *file, int line)\n{\n    void *ret = NULL;\n    if (num <= 0)\n        return NULL;\n    allow_customize = 0;\n#ifndef OPENSSL_NO_CRYPTO_MDEBUG\n    if (call_malloc_debug) {\n        CRYPTO_mem_debug_malloc(NULL, num, 0, file, line);\n        ret = malloc(num);\n        CRYPTO_mem_debug_malloc(ret, num, 1, file, line);\n    } else {\n        ret = malloc(num);\n    }\n#else\n    (void)file;\n    (void)line;\n    ret = malloc(num);\n#endif\n#ifndef OPENSSL_CPUID_OBJ\n    if (ret && (num > 2048)) {\n        extern unsigned char cleanse_ctr;\n        ((unsigned char *)ret)[0] = cleanse_ctr;\n    }\n#endif\n    return ret;\n}', 'int sk_push(_STACK *st, void *data)\n{\n    return (sk_insert(st, data, st->num));\n}', 'int sk_insert(_STACK *st, void *data, int loc)\n{\n    char **s;\n    if (st == NULL)\n        return 0;\n    if (st->num_alloc <= st->num + 1) {\n        s = OPENSSL_realloc((char *)st->data,\n                            (unsigned int)sizeof(char *) * st->num_alloc * 2);\n        if (s == NULL)\n            return (0);\n        st->data = s;\n        st->num_alloc *= 2;\n    }\n    if ((loc >= (int)st->num) || (loc < 0))\n        st->data[st->num] = data;\n    else {\n        memmove(&(st->data[loc + 1]),\n                &(st->data[loc]), sizeof(char *) * (st->num - loc));\n        st->data[loc] = data;\n    }\n    st->num++;\n    st->sorted = 0;\n    return (st->num);\n}', 'void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)\n{\n    if (str == NULL)\n        return CRYPTO_malloc(num, file, line);\n    if (num == 0) {\n        CRYPTO_free(str);\n        return NULL;\n    }\n    allow_customize = 0;\n#ifndef OPENSSL_NO_CRYPTO_MDEBUG\n    if (call_malloc_debug) {\n        void *ret;\n        CRYPTO_mem_debug_realloc(str, NULL, num, 0, file, line);\n        ret = realloc(str, num);\n        CRYPTO_mem_debug_realloc(str, ret, num, 1, file, line);\n        return ret;\n    }\n#else\n    (void)file;\n    (void)line;\n#endif\n    return realloc(str, num);\n}']