test/ectest.c:1184: error: NULL_DEREFERENCE
  pointer `secp521r1_group` last assigned on line 1183 could be null and is dereferenced by call to `EC_GROUP_get0_field()` at line 1184, column 33.
Showing all 27 steps of the trace


test/ectest.c:1163:1: start of procedure group_field_test()
1161.   }
1162.   
1163. > static int group_field_test(void)
1164.   {
1165.       int r = 1;

test/ectest.c:1165:5: 
1163.   static int group_field_test(void)
1164.   {
1165. >     int r = 1;
1166.       BIGNUM *secp521r1_field = NULL;
1167.       BIGNUM *sect163r2_field = NULL;

test/ectest.c:1166:5: 
1164.   {
1165.       int r = 1;
1166. >     BIGNUM *secp521r1_field = NULL;
1167.       BIGNUM *sect163r2_field = NULL;
1168.       EC_GROUP *secp521r1_group = NULL;

test/ectest.c:1167:5: 
1165.       int r = 1;
1166.       BIGNUM *secp521r1_field = NULL;
1167. >     BIGNUM *sect163r2_field = NULL;
1168.       EC_GROUP *secp521r1_group = NULL;
1169.       EC_GROUP *sect163r2_group = NULL;

test/ectest.c:1168:5: 
1166.       BIGNUM *secp521r1_field = NULL;
1167.       BIGNUM *sect163r2_field = NULL;
1168. >     EC_GROUP *secp521r1_group = NULL;
1169.       EC_GROUP *sect163r2_group = NULL;
1170.   

test/ectest.c:1169:5: 
1167.       BIGNUM *sect163r2_field = NULL;
1168.       EC_GROUP *secp521r1_group = NULL;
1169. >     EC_GROUP *sect163r2_group = NULL;
1170.   
1171.       BN_hex2bn(&secp521r1_field,

test/ectest.c:1171:5: Skipping BN_hex2bn(): empty list of specs
1169.       EC_GROUP *sect163r2_group = NULL;
1170.   
1171.       BN_hex2bn(&secp521r1_field,
            ^
1172.                   "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
1173.                   "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"

test/ectest.c:1179:5: Skipping BN_hex2bn(): empty list of specs
1177.   
1178.   
1179.       BN_hex2bn(&sect163r2_field,
            ^
1180.                   "08000000000000000000000000000000"
1181.                   "00000000C9");

test/ectest.c:1183:5: 
1181.                   "00000000C9");
1182.   
1183. >     secp521r1_group = EC_GROUP_new_by_curve_name(NID_secp521r1);
1184.       if (BN_cmp(secp521r1_field, EC_GROUP_get0_field(secp521r1_group)))
1185.         r = 0;

crypto/ec/ec_curve.c:3185:1: start of procedure EC_GROUP_new_by_curve_name()
  3183.   }
  3184.   
  3185. > EC_GROUP *EC_GROUP_new_by_curve_name(int nid)
  3186.   {
  3187.       size_t i;

crypto/ec/ec_curve.c:3188:5: 
  3186.   {
  3187.       size_t i;
  3188. >     EC_GROUP *ret = NULL;
  3189.   
  3190.       if (nid <= 0)

crypto/ec/ec_curve.c:3190:9: Taking false branch
  3188.       EC_GROUP *ret = NULL;
  3189.   
  3190.       if (nid <= 0)
                  ^
  3191.           return NULL;
  3192.   

crypto/ec/ec_curve.c:3202:10: 
  3200.           return NULL;
  3201.   #endif /* FIPS_MODE */
  3202. >     for (i = 0; i < curve_list_length; i++)
  3203.           if (curve_list[i].nid == nid) {
  3204.               ret = ec_group_new_from_data(curve_list[i]);

crypto/ec/ec_curve.c:3202:17: Loop condition is true. Entering loop body
  3200.           return NULL;
  3201.   #endif /* FIPS_MODE */
  3202.       for (i = 0; i < curve_list_length; i++)
                          ^
  3203.           if (curve_list[i].nid == nid) {
  3204.               ret = ec_group_new_from_data(curve_list[i]);

crypto/ec/ec_curve.c:3203:13: Taking true branch
  3201.   #endif /* FIPS_MODE */
  3202.       for (i = 0; i < curve_list_length; i++)
  3203.           if (curve_list[i].nid == nid) {
                      ^
  3204.               ret = ec_group_new_from_data(curve_list[i]);
  3205.               break;

crypto/ec/ec_curve.c:3204:13: Skipping ec_group_new_from_data(): empty list of specs
  3202.       for (i = 0; i < curve_list_length; i++)
  3203.           if (curve_list[i].nid == nid) {
  3204.               ret = ec_group_new_from_data(curve_list[i]);
                      ^
  3205.               break;
  3206.           }

crypto/ec/ec_curve.c:3208:9: Taking true branch
  3206.           }
  3207.   
  3208.       if (ret == NULL) {
                  ^
  3209.           ECerr(EC_F_EC_GROUP_NEW_BY_CURVE_NAME, EC_R_UNKNOWN_GROUP);
  3210.           return NULL;

crypto/ec/ec_curve.c:3209:9: 
  3207.   
  3208.       if (ret == NULL) {
  3209. >         ECerr(EC_F_EC_GROUP_NEW_BY_CURVE_NAME, EC_R_UNKNOWN_GROUP);
  3210.           return NULL;
  3211.       }

providers/fips/fipsprov.c:381:1: start of procedure ERR_put_error()
    379.   }
    380.   
    381. > void ERR_put_error(int lib, int func, int reason, const char *file, int line)
    382.   {
    383.       /*

providers/fips/fipsprov.c:388:5: Skipping __function_pointer__(): unresolved function pointer
    386.        * a OPENSSL_CTX pointer.
    387.        */
    388.       c_put_error(NULL, ERR_PACK(lib, func, reason), file, line);
               ^
    389.       ERR_add_error_data(1, "(in the FIPS module)");
    390.   }

providers/fips/fipsprov.c:389:5: Skipping ERR_add_error_data(): empty list of specs
    387.        */
    388.       c_put_error(NULL, ERR_PACK(lib, func, reason), file, line);
    389.       ERR_add_error_data(1, "(in the FIPS module)");
               ^
    390.   }
    391.   

providers/fips/fipsprov.c:390:1: return from a call to ERR_put_error
    388.       c_put_error(NULL, ERR_PACK(lib, func, reason), file, line);
    389.       ERR_add_error_data(1, "(in the FIPS module)");
    390. > }
    391.   
    392.   void ERR_add_error_data(int num, ...)

crypto/ec/ec_curve.c:3210:9: 
  3208.       if (ret == NULL) {
  3209.           ECerr(EC_F_EC_GROUP_NEW_BY_CURVE_NAME, EC_R_UNKNOWN_GROUP);
  3210. >         return NULL;
  3211.       }
  3212.   

crypto/ec/ec_curve.c:3214:1: return from a call to EC_GROUP_new_by_curve_name
  3212.   
  3213.       return ret;
  3214. > }
  3215.   
  3216.   size_t EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems)

test/ectest.c:1184:9: 
1182.   
1183.       secp521r1_group = EC_GROUP_new_by_curve_name(NID_secp521r1);
1184. >     if (BN_cmp(secp521r1_field, EC_GROUP_get0_field(secp521r1_group)))
1185.         r = 0;
1186.   

crypto/ec/ec_lib.c:369:1: start of procedure EC_GROUP_get0_field()
  367.   }
  368.   
  369. > const BIGNUM *EC_GROUP_get0_field(const EC_GROUP *group)
  370.   {
  371.       return group->field;

crypto/ec/ec_lib.c:371:5: 
  369.   const BIGNUM *EC_GROUP_get0_field(const EC_GROUP *group)
  370.   {
  371. >     return group->field;
  372.   }
  373.   
