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


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

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

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

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

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

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

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

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

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

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

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

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

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}']