ssl/t1_lib.c:296: error: NULL_DEREFERENCE
  pointer `ginfo` last assigned on line 293 could be null and is dereferenced at line 296, column 14.
Showing all 12 steps of the trace


ssl/t1_lib.c:291:1: start of procedure tls_valid_group()
289.   }
290.   
291. > int tls_valid_group(SSL *s, uint16_t group_id, int version)
292.   {
293.       const TLS_GROUP_INFO *ginfo = tls1_group_id_lookup(group_id);

ssl/t1_lib.c:293:5: 
291.   int tls_valid_group(SSL *s, uint16_t group_id, int version)
292.   {
293. >     const TLS_GROUP_INFO *ginfo = tls1_group_id_lookup(group_id);
294.   
295.       if (version < TLS1_3_VERSION) {

ssl/t1_lib.c:214:1: start of procedure tls1_group_id_lookup()
  212.   #endif
  213.   
  214. > const TLS_GROUP_INFO *tls1_group_id_lookup(uint16_t group_id)
  215.   {
  216.   #if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_EC)

ssl/t1_lib.c:220:10: 
  218.   
  219.       /* ECC curves from RFC 4492 and RFC 7027 FFDHE group from RFC 8446 */
  220. >     for (i = 0; i < OSSL_NELEM(nid_list); i++) {
  221.           if (nid_list[i].group_id == group_id)
  222.               return &nid_list[i];

ssl/t1_lib.c:220:17: Loop condition is true. Entering loop body
  218.   
  219.       /* ECC curves from RFC 4492 and RFC 7027 FFDHE group from RFC 8446 */
  220.       for (i = 0; i < OSSL_NELEM(nid_list); i++) {
                         ^
  221.           if (nid_list[i].group_id == group_id)
  222.               return &nid_list[i];

ssl/t1_lib.c:221:13: Taking false branch
  219.       /* ECC curves from RFC 4492 and RFC 7027 FFDHE group from RFC 8446 */
  220.       for (i = 0; i < OSSL_NELEM(nid_list); i++) {
  221.           if (nid_list[i].group_id == group_id)
                     ^
  222.               return &nid_list[i];
  223.       }

ssl/t1_lib.c:220:43: 
  218.   
  219.       /* ECC curves from RFC 4492 and RFC 7027 FFDHE group from RFC 8446 */
  220. >     for (i = 0; i < OSSL_NELEM(nid_list); i++) {
  221.           if (nid_list[i].group_id == group_id)
  222.               return &nid_list[i];

ssl/t1_lib.c:220:17: Loop condition is false. Leaving loop
  218.   
  219.       /* ECC curves from RFC 4492 and RFC 7027 FFDHE group from RFC 8446 */
  220.       for (i = 0; i < OSSL_NELEM(nid_list); i++) {
                         ^
  221.           if (nid_list[i].group_id == group_id)
  222.               return &nid_list[i];

ssl/t1_lib.c:225:5: 
  223.       }
  224.   #endif /* !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_EC) */
  225. >     return NULL;
  226.   }
  227.   

ssl/t1_lib.c:226:1: return from a call to tls1_group_id_lookup
  224.   #endif /* !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_EC) */
  225.       return NULL;
  226. > }
  227.   
  228.   #if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_EC)

ssl/t1_lib.c:295:9: Taking true branch
293.       const TLS_GROUP_INFO *ginfo = tls1_group_id_lookup(group_id);
294.   
295.       if (version < TLS1_3_VERSION) {
               ^
296.           if ((ginfo->flags & TLS_GROUP_ONLY_FOR_TLS1_3) != 0)
297.               return 0;

ssl/t1_lib.c:296:13: 
294.   
295.       if (version < TLS1_3_VERSION) {
296. >         if ((ginfo->flags & TLS_GROUP_ONLY_FOR_TLS1_3) != 0)
297.               return 0;
298.       }

int tls_valid_group(SSL *s, uint16_t group_id, int version)
{
    const TLS_GROUP_INFO *ginfo = tls1_group_id_lookup(group_id);
    if (version < TLS1_3_VERSION) {
        if ((ginfo->flags & TLS_GROUP_ONLY_FOR_TLS1_3) != 0)
            return 0;
    }
    return 1;
}
['int tls_valid_group(SSL *s, uint16_t group_id, int version)\n{\n    const TLS_GROUP_INFO *ginfo = tls1_group_id_lookup(group_id);\n    if (version < TLS1_3_VERSION) {\n        if ((ginfo->flags & TLS_GROUP_ONLY_FOR_TLS1_3) != 0)\n            return 0;\n    }\n    return 1;\n}', 'const TLS_GROUP_INFO *tls1_group_id_lookup(uint16_t group_id)\n{\n#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_EC)\n    size_t i;\n    for (i = 0; i < OSSL_NELEM(nid_list); i++) {\n        if (nid_list[i].group_id == group_id)\n            return &nid_list[i];\n    }\n#endif\n    return NULL;\n}']