cyrus-sasl-2.1.28-33.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1]
cyrus-sasl-2.1.28/include/makemd5.c:243:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘hb’ where non-null expected
cyrus-sasl-2.1.28/include/makemd5.c:235:5: branch_false: following ‘false’ branch (when ‘argc > 1’)...
cyrus-sasl-2.1.28/include/makemd5.c:241:5: branch_false: ...to here
cyrus-sasl-2.1.28/include/makemd5.c:242:10: acquire_memory: this call could return NULL
cyrus-sasl-2.1.28/include/makemd5.c:243:5: danger: argument 1 (‘hb’) from [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#argument 1 of ‘__builtin_sprintf’ must be non-null
#  241|       fn = argv[1];
#  242|       hb = malloc(strlen(fn) + 5);
#  243|->     sprintf(hb, "__%s__", fn);
#  244|       for(p = hb; *p; p++){
#  245|         if(!isalnum((int) *p))

Error: GCC_ANALYZER_WARNING (CWE-465): [#def2]
cyrus-sasl-2.1.28/lib/auxprop.c:409:11: warning[-Wanalyzer-deref-before-check]: check of '*ctx.mem_base' for NULL after already dereferencing it
cyrus-sasl-2.1.28/lib/auxprop.c:766:5: enter_function: entry to 'sasl_auxprop_request'
cyrus-sasl-2.1.28/lib/auxprop.c:771:7: branch_false: following 'false' branch (when 'conn' is non-NULL)...
cyrus-sasl-2.1.28/lib/auxprop.c:772:8: branch_false: ...to here
cyrus-sasl-2.1.28/lib/auxprop.c:772:7: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/auxprop.c:777:7: branch_false: ...to here
cyrus-sasl-2.1.28/lib/auxprop.c:777:7: branch_true: following 'true' branch (when 'propnames' is NULL)...
cyrus-sasl-2.1.28/lib/auxprop.c:778:20: branch_true: ...to here
cyrus-sasl-2.1.28/lib/auxprop.c:778:9: call_function: calling 'prop_clear' from 'sasl_auxprop_request'
#  407|       }
#  408|   
#  409|->     while(ctx->mem_base) {
#  410|   	tmp = ctx->mem_base;
#  411|   	ctx->mem_base = tmp->next;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
cyrus-sasl-2.1.28/lib/auxprop.c:1184:25: warning[-Wanalyzer-malloc-leak]: leak of 'cur_mech'
cyrus-sasl-2.1.28/lib/auxprop.c:1152:8: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/auxprop.c:1153:9: branch_true: ...to here
cyrus-sasl-2.1.28/lib/auxprop.c:1155:12: branch_false: following 'false' branch (when 'c_mech_list' is non-NULL)...
cyrus-sasl-2.1.28/lib/auxprop.c:1167:25: branch_false: ...to here
cyrus-sasl-2.1.28/lib/auxprop.c:1167:25: acquire_memory: allocated here
cyrus-sasl-2.1.28/lib/auxprop.c:1171:20: branch_true: following 'true' branch (when 'cur_mech' is non-NULL)...
cyrus-sasl-2.1.28/lib/auxprop.c:1172:21: branch_true: ...to here
cyrus-sasl-2.1.28/lib/auxprop.c:1173:20: branch_false: following 'false' branch (when 'p' is NULL)...
cyrus-sasl-2.1.28/lib/auxprop.c:1178:17: branch_false: ...to here
cyrus-sasl-2.1.28/lib/auxprop.c:1180:24: branch_true: following 'true' branch (when 'm' is non-NULL)...
cyrus-sasl-2.1.28/lib/auxprop.c:1181:47: branch_true: ...to here
cyrus-sasl-2.1.28/lib/auxprop.c:1181:24: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/auxprop.c:1182:25: branch_true: ...to here
cyrus-sasl-2.1.28/lib/auxprop.c:1184:25: danger: 'cur_mech' leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 1182|   			memcpy (&plug_data, m->plug, sizeof(plug_data));
# 1183|   
# 1184|-> 			info_cb (&plug_data, SASL_INFO_LIST_MECH, info_cb_rock);
# 1185|   		    }
# 1186|   	    

Error: CPPCHECK_WARNING (CWE-119): [#def4]
cyrus-sasl-2.1.28/lib/checkpw.c:122: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: (*secret)->data
#  120|       _sasl_MD5Update(&ctx, (const unsigned char *) "sasldb", 6);
#  121|       _sasl_MD5Update(&ctx, (const unsigned char *) passwd, (unsigned int) passlen);
#  122|->     memcpy((*secret)->data, salt, 16);
#  123|       (*secret)->data[16] = '\0';
#  124|       _sasl_MD5Final((*secret)->data + 17, &ctx);

Error: COMPILER_WARNING: [#def5]
cyrus-sasl-2.1.28/lib/checkpw.c: scope_hint: In function 'saslauthd_verify_password'
cyrus-sasl-2.1.28/lib/checkpw.c:794:5: warning[-Wstringop-truncation]: 'strncpy' output may be truncated copying 107 bytes from a string of length 107
#  794 |     strncpy(srvaddr.sun_path, pwpath, sizeof(srvaddr.sun_path) - 1);
#      |     ^
#  792|       memset((char *)&srvaddr, 0, sizeof(srvaddr));
#  793|       srvaddr.sun_family = AF_UNIX;
#  794|->     strncpy(srvaddr.sun_path, pwpath, sizeof(srvaddr.sun_path) - 1);
#  795|       srvaddr.sun_path[strlen(pwpath)] = '\0';
#  796|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def6]
cyrus-sasl-2.1.28/lib/checkpw.c:798:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 's'
cyrus-sasl-2.1.28/lib/checkpw.c:646:12: enter_function: entry to 'saslauthd_verify_password'
cyrus-sasl-2.1.28/lib/checkpw.c:671:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/checkpw.c:681:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/checkpw.c:708:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/checkpw.c:709:14: branch_false: ...to here
cyrus-sasl-2.1.28/lib/checkpw.c:708:13: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/checkpw.c:710:14: branch_false: ...to here
cyrus-sasl-2.1.28/lib/checkpw.c:708:13: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/checkpw.c:708:13: branch_false: ...to here
cyrus-sasl-2.1.28/lib/checkpw.c:722:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/checkpw.c:723:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/checkpw.c:724:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/checkpw.c:725:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/checkpw.c:726:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/checkpw.c:727:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/checkpw.c:728:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/checkpw.c:730:17: call_function: inlined call to '__bswap_16' from 'saslauthd_verify_password'
cyrus-sasl-2.1.28/lib/checkpw.c:786:9: acquire_resource: stream socket created here
cyrus-sasl-2.1.28/lib/checkpw.c:787:8: branch_false: following 'false' branch (when 's != -1')...
cyrus-sasl-2.1.28/lib/checkpw.c:792:5: branch_false: ...to here
cyrus-sasl-2.1.28/lib/checkpw.c:798:17: danger: 's' leaks here
#  796|   
#  797|       {
#  798|-> 	int r = connect(s, (struct sockaddr *) &srvaddr, sizeof(srvaddr));
#  799|   	if (r == -1) {
#  800|   	    close(s);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def7]
cyrus-sasl-2.1.28/lib/checkpw.c:882:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 's'
cyrus-sasl-2.1.28/lib/checkpw.c:907:12: enter_function: entry to 'authdaemon_connect'
cyrus-sasl-2.1.28/lib/checkpw.c:912:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/checkpw.c:917:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/checkpw.c:917:9: acquire_resource: stream socket created here
cyrus-sasl-2.1.28/lib/checkpw.c:918:8: branch_false: following 'false' branch (when 's != -1')...
cyrus-sasl-2.1.28/lib/checkpw.c:923:5: branch_false: ...to here
cyrus-sasl-2.1.28/lib/checkpw.c:928:9: call_function: calling 'authdaemon_blocking' from 'authdaemon_connect'
#  880|   
#  881|       /* Get the fd's blocking bit. */
#  882|->     f = fcntl(fd, F_GETFL, 0);
#  883|       if (f == -1)
#  884|   	return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
cyrus-sasl-2.1.28/lib/client.c:1299:25: warning[-Wanalyzer-malloc-leak]: leak of 'cur_mech'
cyrus-sasl-2.1.28/lib/client.c:1268:8: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/client.c:1269:9: branch_true: ...to here
cyrus-sasl-2.1.28/lib/client.c:1271:12: branch_false: following 'false' branch (when 'c_mech_list' is non-NULL)...
cyrus-sasl-2.1.28/lib/client.c:1282:25: branch_false: ...to here
cyrus-sasl-2.1.28/lib/client.c:1282:25: acquire_memory: allocated here
cyrus-sasl-2.1.28/lib/client.c:1286:20: branch_true: following 'true' branch (when 'cur_mech' is non-NULL)...
cyrus-sasl-2.1.28/lib/client.c:1287:21: branch_true: ...to here
cyrus-sasl-2.1.28/lib/client.c:1288:20: branch_false: following 'false' branch (when 'p' is NULL)...
cyrus-sasl-2.1.28/lib/client.c:1293:30: branch_false: ...to here
cyrus-sasl-2.1.28/lib/client.c:1295:24: branch_true: following 'true' branch (when 'm' is non-NULL)...
cyrus-sasl-2.1.28/lib/client.c:1296:47: branch_true: ...to here
cyrus-sasl-2.1.28/lib/client.c:1296:24: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/client.c:1297:45: branch_true: ...to here
cyrus-sasl-2.1.28/lib/client.c:1299:25: danger: 'cur_mech' leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 1297|   			memcpy (&plug_data, &m->m, sizeof(plug_data));
# 1298|   
# 1299|-> 			info_cb (&plug_data, SASL_INFO_LIST_MECH, info_cb_rock);
# 1300|   		    }
# 1301|   	    

Error: COMPILER_WARNING (CWE-843): [#def9]
cyrus-sasl-2.1.28/lib/common.c:114:22: warning[-Wcast-function-type]: cast between incompatible function types from 'int (*)(void *, const char **)' to 'int (*)(void)'
#  114 |     SASL_CB_GETPATH, (sasl_callback_ft)&_sasl_getpath, NULL
#      |                      ^
#  112|   /* Default getpath/getconfpath callbacks. These can be edited by sasl_set_path(). */
#  113|   static sasl_callback_t default_getpath_cb = {
#  114|->     SASL_CB_GETPATH, (sasl_callback_ft)&_sasl_getpath, NULL
#  115|   };
#  116|   static sasl_callback_t default_getconfpath_cb = {

Error: COMPILER_WARNING (CWE-843): [#def10]
cyrus-sasl-2.1.28/lib/common.c:117:26: warning[-Wcast-function-type]: cast between incompatible function types from 'int (*)(void *, char **)' to 'int (*)(void)'
#  117 |     SASL_CB_GETCONFPATH, (sasl_callback_ft)&_sasl_getconfpath, NULL
#      |                          ^
#  115|   };
#  116|   static sasl_callback_t default_getconfpath_cb = {
#  117|->     SASL_CB_GETCONFPATH, (sasl_callback_ft)&_sasl_getconfpath, NULL
#  118|   };
#  119|   

Error: COMPILER_WARNING (CWE-843): [#def11]
cyrus-sasl-2.1.28/lib/common.c: scope_hint: In function 'sasl_set_path'
cyrus-sasl-2.1.28/lib/common.c:230:39: warning[-Wcast-function-type]: cast between incompatible function types from 'int (*)(void *, const char **)' to 'int (*)(void)'
#  230 |             default_getpath_cb.proc = (sasl_callback_ft)&_sasl_getpath_simple;
#      |                                       ^
#  228|   
#  229|               /* Update the default getpath_t callback */
#  230|->             default_getpath_cb.proc = (sasl_callback_ft)&_sasl_getpath_simple;
#  231|               break;
#  232|   

Error: COMPILER_WARNING (CWE-843): [#def12]
cyrus-sasl-2.1.28/lib/common.c:244:43: warning[-Wcast-function-type]: cast between incompatible function types from 'int (*)(void *, const char **)' to 'int (*)(void)'
#  244 |             default_getconfpath_cb.proc = (sasl_callback_ft)&_sasl_getconfpath_simple;
#      |                                           ^
#  242|   
#  243|               /* Update the default getpath_t callback */
#  244|->             default_getconfpath_cb.proc = (sasl_callback_ft)&_sasl_getconfpath_simple;
#  245|               break;
#  246|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def13]
cyrus-sasl-2.1.28/lib/common.c:494:21: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cur_invec'
cyrus-sasl-2.1.28/lib/common.c:417:8: branch_false: following 'false' branch (when 'conn' is non-NULL)...
cyrus-sasl-2.1.28/lib/common.c:418:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/common.c:418:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/common.c:422:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/common.c:430:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/common.c:430:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/common.c:444:5: branch_false: ...to here
cyrus-sasl-2.1.28/lib/common.c:448:12: branch_true: following 'true' branch (when 'numiov > i')...
cyrus-sasl-2.1.28/lib/common.c:449:32: branch_true: ...to here
cyrus-sasl-2.1.28/lib/common.c:449:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/common.c:558:13: branch_false: ...to here
cyrus-sasl-2.1.28/lib/common.c:448:12: branch_true: following 'true' branch (when 'numiov > i')...
cyrus-sasl-2.1.28/lib/common.c:449:32: branch_true: ...to here
cyrus-sasl-2.1.28/lib/common.c:467:16: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/common.c:481:16: branch_false: ...to here
cyrus-sasl-2.1.28/lib/common.c:481:16: branch_false: following 'false' branch (when 'next_buf' is NULL)...
cyrus-sasl-2.1.28/lib/common.c:490:16: branch_false: ...to here
cyrus-sasl-2.1.28/lib/common.c:490:16: branch_true: following 'true' branch (when 'i != 0')...
 branch_true: ...to here
cyrus-sasl-2.1.28/lib/common.c:493:29: branch_true: following 'true' branch (when 'i > j')...
cyrus-sasl-2.1.28/lib/common.c:494:56: branch_true: ...to here
cyrus-sasl-2.1.28/lib/common.c:494:30: release_memory: 'cur_invec' is NULL
cyrus-sasl-2.1.28/lib/common.c:494:21: danger: dereference of NULL 'cur_invec + (long unsigned int)(j + index_offset) * 16'
#  492|                   /* NOTE - The starting index in invec is always 0 */
#  493|                   for (j = 0; j < i; j++) {
#  494|->                     cur_invec[j + index_offset] = invec[j];
#  495|                   }
#  496|               }

Error: COMPILER_WARNING (CWE-843): [#def14]
cyrus-sasl-2.1.28/lib/common.c: scope_hint: In function '_sasl_global_getopt'
cyrus-sasl-2.1.28/lib/common.c:1416:16: warning[-Wcast-function-type]: cast between incompatible function types from 'int (*)(void)' to 'int (*)(void *, const char *, const char *, const char **, unsigned int *)'
# 1416 |           if (((sasl_getopt_t *)(callback->proc))(callback->context,
#      |                ^
# 1414|   	if (callback->id == SASL_CB_GETOPT) {
# 1415|   	  if (!callback->proc) return SASL_FAIL;
# 1416|-> 	  if (((sasl_getopt_t *)(callback->proc))(callback->context,
# 1417|   						  plugin_name,
# 1418|   						  option,

Error: COMPILER_WARNING (CWE-843): [#def15]
cyrus-sasl-2.1.28/lib/common.c: scope_hint: In function '_sasl_conn_getopt'
cyrus-sasl-2.1.28/lib/common.c:1457:16: warning[-Wcast-function-type]: cast between incompatible function types from 'int (*)(void)' to 'int (*)(void *, const char *, const char *, const char **, unsigned int *)'
# 1457 |           && (((sasl_getopt_t *)(callback->proc))(callback->context,
#      |                ^
# 1455|   	 callback++)
# 1456|         if (callback->id == SASL_CB_GETOPT
# 1457|-> 	  && (((sasl_getopt_t *)(callback->proc))(callback->context,
# 1458|   						  plugin_name,
# 1459|   						  option,

Error: COMPILER_WARNING (CWE-843): [#def16]
cyrus-sasl-2.1.28/lib/common.c: scope_hint: In function '_sasl_getcallback'
cyrus-sasl-2.1.28/lib/common.c:1734:20: warning[-Wcast-function-type]: cast between incompatible function types from 'int (*)(void *, const char *, const char *, const char **, unsigned int *)' to 'int (*)(void)'
# 1734 |           *pproc = (sasl_callback_ft)&_sasl_conn_getopt;
#      |                    ^
# 1732|     case SASL_CB_GETOPT:
# 1733|         if (conn) {
# 1734|-> 	  *pproc = (sasl_callback_ft)&_sasl_conn_getopt;
# 1735|   	  *pcontext = conn;
# 1736|         } else {

Error: COMPILER_WARNING (CWE-843): [#def17]
cyrus-sasl-2.1.28/lib/common.c:1737:20: warning[-Wcast-function-type]: cast between incompatible function types from 'int (*)(void *, const char *, const char *, const char **, unsigned int *)' to 'int (*)(void)'
# 1737 |           *pproc = (sasl_callback_ft)&_sasl_global_getopt;
#      |                    ^
# 1735|   	  *pcontext = conn;
# 1736|         } else {
# 1737|-> 	  *pproc = (sasl_callback_ft)&_sasl_global_getopt;
# 1738|   	  *pcontext = NULL;
# 1739|         }

Error: COMPILER_WARNING (CWE-843): [#def18]
cyrus-sasl-2.1.28/lib/common.c:1782:14: warning[-Wcast-function-type]: cast between incompatible function types from 'int (*)(void *, int,  const char *)' to 'int (*)(void)'
# 1782 |     *pproc = (sasl_callback_ft)&_sasl_syslog;
#      |              ^
# 1780|   #ifdef HAVE_SYSLOG
# 1781|     case SASL_CB_LOG:
# 1782|->     *pproc = (sasl_callback_ft)&_sasl_syslog;
# 1783|       *pcontext = conn;
# 1784|       return SASL_OK;

Error: COMPILER_WARNING (CWE-843): [#def19]
cyrus-sasl-2.1.28/lib/common.c:1795:14: warning[-Wcast-function-type]: cast between incompatible function types from 'int (*)(void *, int,  const char **, size_t *)' {aka 'int (*)(void *, int,  const char **, long unsigned int *)'} to 'int (*)(void)'
# 1795 |     *pproc = (sasl_callback_ft)&_sasl_getsimple;
#      |              ^
# 1793|       return SASL_OK;
# 1794|     case SASL_CB_AUTHNAME:
# 1795|->     *pproc = (sasl_callback_ft)&_sasl_getsimple;
# 1796|       *pcontext = conn;
# 1797|       return SASL_OK;

Error: COMPILER_WARNING (CWE-843): [#def20]
cyrus-sasl-2.1.28/lib/common.c:1799:14: warning[-Wcast-function-type]: cast between incompatible function types from 'int (*)(void *, char *, int)' to 'int (*)(void)'
# 1799 |     *pproc = (sasl_callback_ft)&_sasl_verifyfile;
#      |              ^
# 1797|       return SASL_OK;
# 1798|     case SASL_CB_VERIFYFILE:
# 1799|->     *pproc = (sasl_callback_ft)&_sasl_verifyfile;
# 1800|       *pcontext = NULL;
# 1801|       return SASL_OK;

Error: COMPILER_WARNING (CWE-843): [#def21]
cyrus-sasl-2.1.28/lib/common.c:1803:14: warning[-Wcast-function-type]: cast between incompatible function types from 'int (*)(sasl_conn_t *, void *, const char *, unsigned int,  const char *, unsigned int,  const char *, unsigned int,  struct propctx *)' {aka 'int (*)(struct sasl_conn *, void *, const char *, unsigned int,  const char *, unsigned int,  const char *, unsigned int,  struct propctx *)'} to 'int (*)(void)'
# 1803 |     *pproc = (sasl_callback_ft)&_sasl_proxy_policy;
#      |              ^
# 1801|       return SASL_OK;
# 1802|     case SASL_CB_PROXY_POLICY:
# 1803|->     *pproc = (sasl_callback_ft)&_sasl_proxy_policy;
# 1804|       *pcontext = NULL;
# 1805|       return SASL_OK;

Error: COMPILER_WARNING (CWE-843): [#def22]
cyrus-sasl-2.1.28/lib/common.c: scope_hint: In function '_sasl_find_verifyfile_callback'
cyrus-sasl-2.1.28/lib/common.c:2160:5: warning[-Wcast-function-type]: cast between incompatible function types from 'int (*)(void *, char *, int)' to 'int (*)(void)'
# 2160 |     (sasl_callback_ft)&_sasl_verifyfile,
#      |     ^
# 2158|     static const sasl_callback_t default_verifyfile_cb = {
# 2159|       SASL_CB_VERIFYFILE,
# 2160|->     (sasl_callback_ft)&_sasl_verifyfile,
# 2161|       NULL
# 2162|     };

Error: GCC_ANALYZER_WARNING (CWE-404): [#def23]
cyrus-sasl-2.1.28/lib/common.c:2189:18: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
cyrus-sasl-2.1.28/lib/common.c:1826:1: enter_function: entry to '_sasl_log'
cyrus-sasl-2.1.28/lib/common.c:1845:5: branch_false: following 'false' branch (when 'fmt' is non-NULL)...
cyrus-sasl-2.1.28/lib/common.c:1847:18: branch_false: ...to here
cyrus-sasl-2.1.28/lib/common.c:1848:5: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/common.c:1850:15: branch_false: ...to here
cyrus-sasl-2.1.28/lib/common.c:1853:12: call_function: calling '_sasl_getcallback' from '_sasl_log'
cyrus-sasl-2.1.28/lib/common.c:1853:12: return_function: returning to '_sasl_log' from '_sasl_getcallback'
cyrus-sasl-2.1.28/lib/common.c:1854:6: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/common.c:1854:28: branch_true: ...to here
cyrus-sasl-2.1.28/lib/common.c:1854:7: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/common.c:1858:3: branch_false: ...to here
cyrus-sasl-2.1.28/lib/common.c:1858:3: acquire_resource: 'va_start' called here
cyrus-sasl-2.1.28/lib/common.c:1860:9: branch_true: following 'true' branch (when 'pos < formatlen')...
cyrus-sasl-2.1.28/lib/common.c:1862:12: branch_true: ...to here
cyrus-sasl-2.1.28/lib/common.c:1862:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/common.c:1875:7: branch_false: ...to here
cyrus-sasl-2.1.28/lib/common.c:1878:14: branch_true: following 'true' branch (when 'done == 0')...
cyrus-sasl-2.1.28/lib/common.c:1880:19: branch_true: ...to here
cyrus-sasl-2.1.28/lib/common.c:1884:22: call_function: calling '_sasl_add_string' from '_sasl_log'
# 2187|   
# 2188|           /* WARN - We will leak the old buffer on failure */
# 2189|-> 	*rwbuf = sasl_REALLOC(*rwbuf, (unsigned)needed);
# 2190|   	
# 2191|   	if (*rwbuf == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def24]
cyrus-sasl-2.1.28/lib/config.c:114:24: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "r")'
cyrus-sasl-2.1.28/lib/config.c:75:14: acquire_resource: opened here
cyrus-sasl-2.1.28/lib/config.c:76:8: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:80:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/config.c:83:17: branch_true: ...to here
cyrus-sasl-2.1.28/lib/config.c:85:12: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:92:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/config.c:96:10: branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:100:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/config.c:106:20: branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:112:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/config.c:113:13: branch_true: ...to here
cyrus-sasl-2.1.28/lib/config.c:114:24: danger: 'fopen(filename, "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  112|   	if (nconfiglist == alloced) {
#  113|   	    alloced += CONFIGLISTGROWSIZE;
#  114|-> 	    configlist=sasl_REALLOC((char *)configlist, 
#  115|   				    alloced * sizeof(struct configlist));
#  116|   	    if (configlist == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
cyrus-sasl-2.1.28/lib/config.c:114:24: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "r")'
cyrus-sasl-2.1.28/lib/config.c:75:14: acquire_memory: allocated here
cyrus-sasl-2.1.28/lib/config.c:76:8: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:80:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/config.c:83:17: branch_true: ...to here
cyrus-sasl-2.1.28/lib/config.c:85:12: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:92:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/config.c:96:10: branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:100:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/config.c:106:20: branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:112:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/config.c:113:13: branch_true: ...to here
cyrus-sasl-2.1.28/lib/config.c:114:24: danger: 'fopen(filename, "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  112|   	if (nconfiglist == alloced) {
#  113|   	    alloced += CONFIGLISTGROWSIZE;
#  114|-> 	    configlist=sasl_REALLOC((char *)configlist, 
#  115|   				    alloced * sizeof(struct configlist));
#  116|   	    if (configlist == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def26]
cyrus-sasl-2.1.28/lib/config.c:122:18: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "r")'
cyrus-sasl-2.1.28/lib/config.c:75:14: acquire_resource: opened here
cyrus-sasl-2.1.28/lib/config.c:76:8: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:80:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/config.c:83:17: branch_true: ...to here
cyrus-sasl-2.1.28/lib/config.c:85:12: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:92:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/config.c:96:10: branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:100:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/config.c:106:20: branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:112:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/config.c:113:13: branch_true: ...to here
cyrus-sasl-2.1.28/lib/config.c:116:16: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/config.c:123:43: branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:122:18: danger: 'fopen(filename, "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  120|   	}
#  121|   
#  122|-> 	result = _sasl_strdup(key,
#  123|   			      &(configlist[nconfiglist].key),
#  124|   			      NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
cyrus-sasl-2.1.28/lib/config.c:122:18: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "r")'
cyrus-sasl-2.1.28/lib/config.c:75:14: acquire_memory: allocated here
cyrus-sasl-2.1.28/lib/config.c:76:8: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:80:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/config.c:83:17: branch_true: ...to here
cyrus-sasl-2.1.28/lib/config.c:85:12: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:92:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/config.c:96:10: branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:100:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/config.c:106:20: branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:112:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/config.c:113:13: branch_true: ...to here
cyrus-sasl-2.1.28/lib/config.c:116:16: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/config.c:123:43: branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:122:18: danger: 'fopen(filename, "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  120|   	}
#  121|   
#  122|-> 	result = _sasl_strdup(key,
#  123|   			      &(configlist[nconfiglist].key),
#  124|   			      NULL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def28]
cyrus-sasl-2.1.28/lib/config.c:129:18: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(filename, "r")'
cyrus-sasl-2.1.28/lib/config.c:75:14: acquire_resource: opened here
cyrus-sasl-2.1.28/lib/config.c:76:8: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:80:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/config.c:83:17: branch_true: ...to here
cyrus-sasl-2.1.28/lib/config.c:85:12: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:92:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/config.c:96:10: branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:100:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/config.c:106:20: branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:112:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/config.c:113:13: branch_true: ...to here
cyrus-sasl-2.1.28/lib/config.c:116:16: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/config.c:123:43: branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:125:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/config.c:130:43: branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:129:18: danger: 'fopen(filename, "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  127|   	    return result;
#  128|   	}
#  129|-> 	result = _sasl_strdup(p,
#  130|   			      &(configlist[nconfiglist].value),
#  131|   			      NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
cyrus-sasl-2.1.28/lib/config.c:129:18: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(filename, "r")'
cyrus-sasl-2.1.28/lib/config.c:75:14: acquire_memory: allocated here
cyrus-sasl-2.1.28/lib/config.c:76:8: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:80:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/config.c:83:17: branch_true: ...to here
cyrus-sasl-2.1.28/lib/config.c:85:12: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:92:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/config.c:96:10: branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:100:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/config.c:106:20: branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:112:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/config.c:113:13: branch_true: ...to here
cyrus-sasl-2.1.28/lib/config.c:116:16: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/config.c:123:43: branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:125:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/config.c:130:43: branch_false: ...to here
cyrus-sasl-2.1.28/lib/config.c:129:18: danger: 'fopen(filename, "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  127|   	    return result;
#  128|   	}
#  129|-> 	result = _sasl_strdup(p,
#  130|   			      &(configlist[nconfiglist].value),
#  131|   			      NULL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def30]
cyrus-sasl-2.1.28/lib/dlopen.c:309:13: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(&line, "r")'
cyrus-sasl-2.1.28/lib/dlopen.c:263:7: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:270:8: branch_false: following 'false' branch (when the strings are equal)...
cyrus-sasl-2.1.28/lib/dlopen.c:294:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:294:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:296:5: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:299:12: acquire_resource: opened here
cyrus-sasl-2.1.28/lib/dlopen.c:300:7: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:306:11: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:307:13: branch_true: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:307:11: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:308:17: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:309:13: danger: 'fopen(&line, "r")' leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  307|   	if(!fgets(line, MAX_LINE, file)) break;
#  308|   	if(line[strlen(line) - 1] != '\n') {
#  309|-> 	    _sasl_log(NULL, SASL_LOG_WARN,
#  310|   		      "LA file has too long of a line: %s", in);
#  311|   	    fclose(file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
cyrus-sasl-2.1.28/lib/dlopen.c:309:13: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(&line, "r")'
cyrus-sasl-2.1.28/lib/dlopen.c:263:7: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:270:8: branch_false: following 'false' branch (when the strings are equal)...
cyrus-sasl-2.1.28/lib/dlopen.c:294:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:294:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:296:5: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:299:12: acquire_memory: allocated here
cyrus-sasl-2.1.28/lib/dlopen.c:300:7: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:306:11: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:307:13: branch_true: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:307:11: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:308:17: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:309:13: danger: 'fopen(&line, "r")' leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  307|   	if(!fgets(line, MAX_LINE, file)) break;
#  308|   	if(line[strlen(line) - 1] != '\n') {
#  309|-> 	    _sasl_log(NULL, SASL_LOG_WARN,
#  310|   		      "LA file has too long of a line: %s", in);
#  311|   	    fclose(file);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def32]
cyrus-sasl-2.1.28/lib/dlopen.c:329:21: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(&line, "r")'
cyrus-sasl-2.1.28/lib/dlopen.c:263:7: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:270:8: branch_false: following 'false' branch (when the strings are equal)...
cyrus-sasl-2.1.28/lib/dlopen.c:294:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:294:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:296:5: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:299:12: acquire_resource: opened here
cyrus-sasl-2.1.28/lib/dlopen.c:300:7: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:306:11: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:307:13: branch_true: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:307:11: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:308:17: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:308:11: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:314:12: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:324:15: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:328:19: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:329:21: branch_true: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:329:21: danger: 'fopen(&line, "r")' leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  327|   		/* Do we have dlname="" ? */
#  328|   		if(ntmp == end) {
#  329|-> 		    _sasl_log(NULL, SASL_LOG_DEBUG,
#  330|   			      "dlname is empty in .la file: %s", in);
#  331|   		    fclose(file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
cyrus-sasl-2.1.28/lib/dlopen.c:329:21: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(&line, "r")'
cyrus-sasl-2.1.28/lib/dlopen.c:263:7: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:270:8: branch_false: following 'false' branch (when the strings are equal)...
cyrus-sasl-2.1.28/lib/dlopen.c:294:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:294:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:296:5: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:299:12: acquire_memory: allocated here
cyrus-sasl-2.1.28/lib/dlopen.c:300:7: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:306:11: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:307:13: branch_true: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:307:11: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:308:17: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:308:11: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:314:12: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:324:15: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:328:19: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:329:21: branch_true: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:329:21: danger: 'fopen(&line, "r")' leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  327|   		/* Do we have dlname="" ? */
#  328|   		if(ntmp == end) {
#  329|-> 		    _sasl_log(NULL, SASL_LOG_DEBUG,
#  330|   			      "dlname is empty in .la file: %s", in);
#  331|   		    fclose(file);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def34]
cyrus-sasl-2.1.28/lib/dlopen.c:341:9: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(&line, "r")'
cyrus-sasl-2.1.28/lib/dlopen.c:263:7: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:270:8: branch_false: following 'false' branch (when the strings are equal)...
cyrus-sasl-2.1.28/lib/dlopen.c:294:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:294:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:296:5: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:299:12: acquire_resource: opened here
cyrus-sasl-2.1.28/lib/dlopen.c:300:7: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:341:9: danger: 'fopen(&line, "r")' leaks here; was opened at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  339|       }
#  340|       if(ferror(file) || feof(file)) {
#  341|-> 	_sasl_log(NULL, SASL_LOG_WARN,
#  342|   		  "Error reading .la: %s\n", in);
#  343|   	fclose(file);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
cyrus-sasl-2.1.28/lib/dlopen.c:341:9: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(&line, "r")'
cyrus-sasl-2.1.28/lib/dlopen.c:263:7: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:270:8: branch_false: following 'false' branch (when the strings are equal)...
cyrus-sasl-2.1.28/lib/dlopen.c:294:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:294:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:296:5: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:299:12: acquire_memory: allocated here
cyrus-sasl-2.1.28/lib/dlopen.c:300:7: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:341:9: danger: 'fopen(&line, "r")' leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  339|       }
#  340|       if(ferror(file) || feof(file)) {
#  341|-> 	_sasl_log(NULL, SASL_LOG_WARN,
#  342|   		  "Error reading .la: %s\n", in);
#  343|   	fclose(file);

Error: COMPILER_WARNING (CWE-843): [#def36]
cyrus-sasl-2.1.28/lib/dlopen.c: scope_hint: In function '_sasl_get_plugin'
cyrus-sasl-2.1.28/lib/dlopen.c:369:10: warning[-Wcast-function-type]: cast between incompatible function types from 'int (*)(void)' to 'int (*)(void *, const char *, sasl_verify_type_t)'
#  369 |     r = ((sasl_verifyfile_t *)(verifyfile_cb->proc))
#      |          ^
#  367|       lib_list_t *newhead;
#  368|       
#  369|->     r = ((sasl_verifyfile_t *)(verifyfile_cb->proc))
#  370|   		    (verifyfile_cb->context, file, SASL_VRFY_PLUGIN);
#  371|       if (r != SASL_OK) return r;

Error: COMPILER_WARNING (CWE-843): [#def37]
cyrus-sasl-2.1.28/lib/dlopen.c: scope_hint: In function '_sasl_load_plugins'
cyrus-sasl-2.1.28/lib/dlopen.c:469:15: warning[-Wcast-function-type]: cast between incompatible function types from 'int (*)(void)' to 'int (*)(void *, const char **)'
#  469 |     result = ((sasl_getpath_t *)(getpath_cb->proc))(getpath_cb->context,
#      |               ^
#  467|   #if defined(DO_DLOPEN) && (defined(PIC) || (!defined(PIC) && defined(TRY_DLOPEN_WHEN_STATIC)))
#  468|       /* get the path to the plugins */
#  469|->     result = ((sasl_getpath_t *)(getpath_cb->proc))(getpath_cb->context,
#  470|   						    &path);
#  471|       if (result != SASL_OK) return result;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
cyrus-sasl-2.1.28/lib/dlopen.c:494:25: warning[-Wanalyzer-malloc-leak]: leak of 'opendir(&str)'
cyrus-sasl-2.1.28/lib/dlopen.c:423:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:425:12: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:423:9: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:426:14: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:423:9: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:423:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:423:9: branch_false: following 'false' branch (when 'verifyfile_cb' is non-NULL)...
cyrus-sasl-2.1.28/lib/dlopen.c:428:12: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:423:9: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:429:14: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:423:9: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:469:53: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:471:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:472:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:472:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:474:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:474:8: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:486:18: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/dlopen.c:487:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:492:17: acquire_memory: allocated here
cyrus-sasl-2.1.28/lib/dlopen.c:492:12: branch_true: following 'true' branch...
 branch_true: ...to here
cyrus-sasl-2.1.28/lib/dlopen.c:494:25: danger: 'opendir(&str)' leaks here; was allocated at [(21)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/20)
#  492|   	if ((dp=opendir(str)) !=NULL) /* ignore errors */    
#  493|   	{
#  494|-> 	    while ((dir=readdir(dp)) != NULL)
#  495|   	    {
#  496|   		size_t length;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def39]
cyrus-sasl-2.1.28/lib/md5.c:189:10: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'x[1]'
cyrus-sasl-2.1.28/lib/md5.c:433:6: enter_function: entry to '_sasl_hmac_md5'
cyrus-sasl-2.1.28/lib/md5.c:451:6: branch_true: following 'true' branch (when 'key_len > 64')...
cyrus-sasl-2.1.28/lib/md5.c:455:5: branch_true: ...to here
cyrus-sasl-2.1.28/lib/md5.c:456:5: call_function: calling '_sasl_MD5Update' from '_sasl_hmac_md5'
cyrus-sasl-2.1.28/lib/md5.c:456:5: return_function: returning to '_sasl_hmac_md5' from '_sasl_MD5Update'
cyrus-sasl-2.1.28/lib/md5.c:457:5: call_function: calling '_sasl_MD5Final' from '_sasl_hmac_md5'
#  187|            /* Round 1 */
#  188|            FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
#  189|->          FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
#  190|            FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
#  191|            FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */

Error: COMPILER_WARNING: [#def40]
cyrus-sasl-2.1.28/lib/md5.c: scope_hint: In function '_sasl_hmac_md5'
cyrus-sasl-2.1.28/lib/md5.c:433:6: warning[-Wold-style-definition]: old-style function definition
#  433 | void _sasl_hmac_md5(text, text_len, key, key_len, digest)
#      |      ^~~~~~~~~~~~~~
#  431|   
#  432|   
#  433|-> void _sasl_hmac_md5(text, text_len, key, key_len, digest)
#  434|   const unsigned char* text; /* pointer to data stream */
#  435|   int text_len; /* length of data stream */

Error: COMPILER_WARNING: [#def41]
cyrus-sasl-2.1.28/lib/md5.c:433:6: warning[-Wold-style-definition]: old-style function definition
#  431|   
#  432|   
#  433|-> void _sasl_hmac_md5(text, text_len, key, key_len, digest)
#  434|   const unsigned char* text; /* pointer to data stream */
#  435|   int text_len; /* length of data stream */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def42]
cyrus-sasl-2.1.28/lib/saslutil.c:341:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/urandom", 0)'
cyrus-sasl-2.1.28/lib/saslutil.c:327:14: acquire_resource: opened here
cyrus-sasl-2.1.28/lib/saslutil.c:328:11: branch_true: following 'true' branch...
 branch_true: ...to here
cyrus-sasl-2.1.28/lib/saslutil.c:341:13: danger: 'open("/dev/urandom", 0)' leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  339|   	    } while(bytesleft != 0);
#  340|   		
#  341|-> 	    close(fd);
#  342|   	}
#  343|       }

Error: COMPILER_WARNING (CWE-195): [#def43]
cyrus-sasl-2.1.28/lib/saslutil.c: scope_hint: In function 'get_fqhostname'
cyrus-sasl-2.1.28/lib/saslutil.c:563:42: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int'
#  563 |         || strlen (result->ai_canonname) > namelen -1) {
#      |                                          ^
#  561|       if (result == NULL || result->ai_canonname == NULL
#  562|           || strchr (result->ai_canonname, '.') == NULL
#  563|->         || strlen (result->ai_canonname) > namelen -1) {
#  564|   	freeaddrinfo (result);
#  565|           if (abort_if_no_fqdn) {

Error: COMPILER_WARNING (CWE-843): [#def44]
cyrus-sasl-2.1.28/lib/server.c: scope_hint: In function 'load_config'
cyrus-sasl-2.1.28/lib/server.c:626:15: warning[-Wcast-function-type]: cast between incompatible function types from 'int (*)(void)' to 'int (*)(void *, char **)'
#  626 |     result = ((sasl_getconfpath_t *)(getconfpath_cb->proc))(getconfpath_cb->context,
#      |               ^
#  624|       /* getconfpath_cb->proc MUST be a sasl_getconfpath_t; if only C had a type
#  625|          system */
#  626|->     result = ((sasl_getconfpath_t *)(getconfpath_cb->proc))(getconfpath_cb->context,
#  627|   							    (char **) &path_to_config);
#  628|       if (result != SASL_OK) goto done;

Error: COMPILER_WARNING (CWE-843): [#def45]
cyrus-sasl-2.1.28/lib/server.c:664:19: warning[-Wcast-function-type]: cast between incompatible function types from 'int (*)(void)' to 'int (*)(void *, const char *, sasl_verify_type_t)'
#  664 |         result = ((sasl_verifyfile_t *)(verifyfile_cb->proc))(verifyfile_cb->context,
#      |                   ^
#  662|   
#  663|           /* Ask the application if it's safe to use this file */
#  664|->         result = ((sasl_verifyfile_t *)(verifyfile_cb->proc))(verifyfile_cb->context,
#  665|   					        config_filename, SASL_VRFY_CONF);
#  666|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def46]
cyrus-sasl-2.1.28/lib/server.c:716:13: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(mechlistfile, "r")'
cyrus-sasl-2.1.28/lib/server.c:741:12: enter_function: entry to 'parse_mechlist_file'
cyrus-sasl-2.1.28/lib/server.c:748:9: acquire_resource: opened here
cyrus-sasl-2.1.28/lib/server.c:749:8: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:752:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/server.c:753:26: branch_true: ...to here
cyrus-sasl-2.1.28/lib/server.c:756:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/server.c:757:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:760:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/server.c:761:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:768:18: call_function: calling 'grab_field' from 'parse_mechlist_file'
#  714|       /* find end of field */
#  715|       while (line[d] && !isspace(((int) line[d]))) d++;
#  716|->     field = sasl_ALLOC(d + 1);
#  717|       if (!field) { return NULL; }
#  718|       memcpy(field, line, d);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
cyrus-sasl-2.1.28/lib/server.c:716:13: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(mechlistfile, "r")'
cyrus-sasl-2.1.28/lib/server.c:741:12: enter_function: entry to 'parse_mechlist_file'
cyrus-sasl-2.1.28/lib/server.c:748:9: acquire_memory: allocated here
cyrus-sasl-2.1.28/lib/server.c:749:8: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:752:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/server.c:753:26: branch_true: ...to here
cyrus-sasl-2.1.28/lib/server.c:756:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/server.c:757:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:760:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/server.c:761:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:768:18: call_function: calling 'grab_field' from 'parse_mechlist_file'
#  714|       /* find end of field */
#  715|       while (line[d] && !isspace(((int) line[d]))) d++;
#  716|->     field = sasl_ALLOC(d + 1);
#  717|       if (!field) { return NULL; }
#  718|       memcpy(field, line, d);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def48]
cyrus-sasl-2.1.28/lib/server.c:753:26: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(mechlistfile, "r")'
cyrus-sasl-2.1.28/lib/server.c:748:9: acquire_resource: opened here
cyrus-sasl-2.1.28/lib/server.c:749:8: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:752:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/server.c:753:26: branch_true: ...to here
cyrus-sasl-2.1.28/lib/server.c:753:26: danger: 'fopen(mechlistfile, "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  751|       r = SASL_OK;
#  752|       while (fgets(buf, sizeof(buf), f) != NULL) {
#  753|-> 	mechanism_t *n = sasl_ALLOC(sizeof(mechanism_t));
#  754|   	sasl_server_plug_t *nplug;
#  755|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
cyrus-sasl-2.1.28/lib/server.c:753:26: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(mechlistfile, "r")'
cyrus-sasl-2.1.28/lib/server.c:748:9: acquire_memory: allocated here
cyrus-sasl-2.1.28/lib/server.c:749:8: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:752:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/server.c:753:26: branch_true: ...to here
cyrus-sasl-2.1.28/lib/server.c:753:26: danger: 'fopen(mechlistfile, "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  751|       r = SASL_OK;
#  752|       while (fgets(buf, sizeof(buf), f) != NULL) {
#  753|-> 	mechanism_t *n = sasl_ALLOC(sizeof(mechanism_t));
#  754|   	sasl_server_plug_t *nplug;
#  755|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
cyrus-sasl-2.1.28/lib/server.c:759:17: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(mechlistfile, "r")'
cyrus-sasl-2.1.28/lib/server.c:748:9: acquire_resource: opened here
cyrus-sasl-2.1.28/lib/server.c:749:8: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:752:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/server.c:753:26: branch_true: ...to here
cyrus-sasl-2.1.28/lib/server.c:756:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/server.c:757:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:759:17: danger: 'fopen(mechlistfile, "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  757|   	n->m.version = SASL_SERVER_PLUG_VERSION;
#  758|   	n->m.condition = SASL_CONTINUE;
#  759|-> 	nplug = sasl_ALLOC(sizeof(sasl_server_plug_t));
#  760|   	if (nplug == NULL) { r = SASL_NOMEM; break; }
#  761|   	memset(nplug, 0, sizeof(sasl_server_plug_t));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
cyrus-sasl-2.1.28/lib/server.c:759:17: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(mechlistfile, "r")'
cyrus-sasl-2.1.28/lib/server.c:748:9: acquire_memory: allocated here
cyrus-sasl-2.1.28/lib/server.c:749:8: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:752:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/server.c:753:26: branch_true: ...to here
cyrus-sasl-2.1.28/lib/server.c:756:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/server.c:757:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:759:17: danger: 'fopen(mechlistfile, "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  757|   	n->m.version = SASL_SERVER_PLUG_VERSION;
#  758|   	n->m.condition = SASL_CONTINUE;
#  759|-> 	nplug = sasl_ALLOC(sizeof(sasl_server_plug_t));
#  760|   	if (nplug == NULL) { r = SASL_NOMEM; break; }
#  761|   	memset(nplug, 0, sizeof(sasl_server_plug_t));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def52]
cyrus-sasl-2.1.28/lib/server.c:791:17: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(mechlistfile, "r")'
cyrus-sasl-2.1.28/lib/server.c:748:9: acquire_resource: opened here
cyrus-sasl-2.1.28/lib/server.c:749:8: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:752:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/server.c:753:26: branch_true: ...to here
cyrus-sasl-2.1.28/lib/server.c:756:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/server.c:757:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:760:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/server.c:761:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:777:16: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/server.c:781:17: branch_true: ...to here
cyrus-sasl-2.1.28/lib/server.c:790:16: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/server.c:791:17: branch_true: ...to here
cyrus-sasl-2.1.28/lib/server.c:791:17: danger: 'fopen(mechlistfile, "r")' leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  789|   	    }
#  790|   	    if (!map->name) {
#  791|-> 		_sasl_log(NULL, SASL_LOG_ERR,
#  792|   			  "%s: couldn't identify flag '%s'",
#  793|   			  nplug->mech_name, t);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
cyrus-sasl-2.1.28/lib/server.c:791:17: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(mechlistfile, "r")'
cyrus-sasl-2.1.28/lib/server.c:748:9: acquire_memory: allocated here
cyrus-sasl-2.1.28/lib/server.c:749:8: branch_false: following 'false' branch...
 branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:752:12: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/server.c:753:26: branch_true: ...to here
cyrus-sasl-2.1.28/lib/server.c:756:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/server.c:757:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:760:12: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/server.c:761:9: branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:777:16: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/server.c:781:17: branch_true: ...to here
cyrus-sasl-2.1.28/lib/server.c:790:16: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/server.c:791:17: branch_true: ...to here
cyrus-sasl-2.1.28/lib/server.c:791:17: danger: 'fopen(mechlistfile, "r")' leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  789|   	    }
#  790|   	    if (!map->name) {
#  791|-> 		_sasl_log(NULL, SASL_LOG_ERR,
#  792|   			  "%s: couldn't identify flag '%s'",
#  793|   			  nplug->mech_name, t);

Error: COMPILER_WARNING (CWE-843): [#def54]
cyrus-sasl-2.1.28/lib/server.c: scope_hint: In function 'sasl_server_init'
cyrus-sasl-2.1.28/lib/server.c:916:16: warning[-Wcast-function-type]: cast between incompatible function types from 'int (*)(void)' to 'int (*)(void *, const char *, sasl_verify_type_t)'
#  916 |         ret = ((sasl_verifyfile_t *)(vf->proc))(vf->context,
#      |                ^
#  914|   
#  915|   	/* Ask the application if it's safe to use this file */
#  916|-> 	ret = ((sasl_verifyfile_t *)(vf->proc))(vf->context,
#  917|   						pluginfile,
#  918|   						SASL_VRFY_CONF);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
cyrus-sasl-2.1.28/lib/server.c:2388:25: warning[-Wanalyzer-malloc-leak]: leak of 'cur_mech'
cyrus-sasl-2.1.28/lib/server.c:2357:8: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/server.c:2358:9: branch_true: ...to here
cyrus-sasl-2.1.28/lib/server.c:2360:12: branch_false: following 'false' branch (when 'c_mech_list' is non-NULL)...
cyrus-sasl-2.1.28/lib/server.c:2371:25: branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:2371:25: acquire_memory: allocated here
cyrus-sasl-2.1.28/lib/server.c:2375:20: branch_true: following 'true' branch (when 'cur_mech' is non-NULL)...
cyrus-sasl-2.1.28/lib/server.c:2376:21: branch_true: ...to here
cyrus-sasl-2.1.28/lib/server.c:2377:20: branch_false: following 'false' branch (when 'p' is NULL)...
cyrus-sasl-2.1.28/lib/server.c:2382:29: branch_false: ...to here
cyrus-sasl-2.1.28/lib/server.c:2384:24: branch_true: following 'true' branch (when 'm' is non-NULL)...
cyrus-sasl-2.1.28/lib/server.c:2385:47: branch_true: ...to here
cyrus-sasl-2.1.28/lib/server.c:2385:24: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/server.c:2386:45: branch_true: ...to here
cyrus-sasl-2.1.28/lib/server.c:2388:25: danger: 'cur_mech' leaks here; was allocated at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
# 2386|   			memcpy (&plug_data, &m->m, sizeof(plug_data));
# 2387|   
# 2388|-> 			info_cb (&plug_data, SASL_INFO_LIST_MECH, info_cb_rock);
# 2389|   		    }
# 2390|   	    

Error: GCC_ANALYZER_WARNING (CWE-404): [#def56]
cyrus-sasl-2.1.28/lib/seterror.c:148:16: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
cyrus-sasl-2.1.28/lib/seterror.c:119:5: branch_false: following 'false' branch (when 'conn' is non-NULL)...
cyrus-sasl-2.1.28/lib/seterror.c:134:12: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:134:12: branch_false: following 'false' branch (when 'fmt' is non-NULL)...
cyrus-sasl-2.1.28/lib/seterror.c:138:3: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:142:3: acquire_resource: 'va_start' called here
cyrus-sasl-2.1.28/lib/seterror.c:144:9: branch_true: following 'true' branch (when 'pos < formatlen')...
cyrus-sasl-2.1.28/lib/seterror.c:146:12: branch_true: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:146:8: branch_true: following 'true' branch...
cyrus-sasl-2.1.28/lib/seterror.c:148:16: branch_true: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:148:16: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  146|       if (fmt[pos]!='%') /* regular character */
#  147|       {
#  148|->       result = _buf_alloc(error_buf, error_buf_len, outlen+1);
#  149|         if (result != SASL_OK)
#  150|   	goto done;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def57]
cyrus-sasl-2.1.28/lib/seterror.c:168:22: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
cyrus-sasl-2.1.28/lib/seterror.c:119:5: branch_false: following 'false' branch (when 'conn' is non-NULL)...
cyrus-sasl-2.1.28/lib/seterror.c:134:12: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:134:12: branch_false: following 'false' branch (when 'fmt' is non-NULL)...
cyrus-sasl-2.1.28/lib/seterror.c:138:3: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:142:3: acquire_resource: 'va_start' called here
cyrus-sasl-2.1.28/lib/seterror.c:144:9: branch_true: following 'true' branch (when 'pos < formatlen')...
cyrus-sasl-2.1.28/lib/seterror.c:146:12: branch_true: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:146:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/seterror.c:159:7: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:162:14: branch_true: following 'true' branch (when 'done == 0')...
cyrus-sasl-2.1.28/lib/seterror.c:164:19: branch_true: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:168:22: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  166|   	  case 's': /* need to handle this */
#  167|   	    cval = va_arg(ap, char *); /* get the next arg */
#  168|-> 	    result = _sasl_add_string(error_buf, error_buf_len,
#  169|   				      &outlen, cval);
#  170|   	      

Error: GCC_ANALYZER_WARNING (CWE-404): [#def58]
cyrus-sasl-2.1.28/lib/seterror.c:178:22: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
cyrus-sasl-2.1.28/lib/seterror.c:119:5: branch_false: following 'false' branch (when 'conn' is non-NULL)...
cyrus-sasl-2.1.28/lib/seterror.c:134:12: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:134:12: branch_false: following 'false' branch (when 'fmt' is non-NULL)...
cyrus-sasl-2.1.28/lib/seterror.c:138:3: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:142:3: acquire_resource: 'va_start' called here
cyrus-sasl-2.1.28/lib/seterror.c:144:9: branch_true: following 'true' branch (when 'pos < formatlen')...
cyrus-sasl-2.1.28/lib/seterror.c:146:12: branch_true: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:146:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/seterror.c:159:7: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:162:14: branch_true: following 'true' branch (when 'done == 0')...
cyrus-sasl-2.1.28/lib/seterror.c:164:19: branch_true: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:178:22: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  176|   
#  177|   	  case '%': /* double % output the '%' character */
#  178|-> 	    result = _buf_alloc(error_buf, error_buf_len, outlen+1);
#  179|   	    if (result != SASL_OK)
#  180|   	      goto done;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def59]
cyrus-sasl-2.1.28/lib/seterror.c:187:22: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
cyrus-sasl-2.1.28/lib/seterror.c:119:5: branch_false: following 'false' branch (when 'conn' is non-NULL)...
cyrus-sasl-2.1.28/lib/seterror.c:134:12: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:134:12: branch_false: following 'false' branch (when 'fmt' is non-NULL)...
cyrus-sasl-2.1.28/lib/seterror.c:138:3: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:142:3: acquire_resource: 'va_start' called here
cyrus-sasl-2.1.28/lib/seterror.c:144:9: branch_true: following 'true' branch (when 'pos < formatlen')...
cyrus-sasl-2.1.28/lib/seterror.c:146:12: branch_true: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:146:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/seterror.c:159:7: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:162:14: branch_true: following 'true' branch (when 'done == 0')...
cyrus-sasl-2.1.28/lib/seterror.c:164:19: branch_true: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:187:22: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  185|   
#  186|   	  case 'm': /* insert the errno string */
#  187|-> 	    result = _sasl_add_string(error_buf, error_buf_len,
#  188|   				      &outlen,
#  189|   				      strerror(va_arg(ap, int)));

Error: GCC_ANALYZER_WARNING (CWE-404): [#def60]
cyrus-sasl-2.1.28/lib/seterror.c:196:22: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
cyrus-sasl-2.1.28/lib/seterror.c:119:5: branch_false: following 'false' branch (when 'conn' is non-NULL)...
cyrus-sasl-2.1.28/lib/seterror.c:134:12: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:134:12: branch_false: following 'false' branch (when 'fmt' is non-NULL)...
cyrus-sasl-2.1.28/lib/seterror.c:138:3: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:142:3: acquire_resource: 'va_start' called here
cyrus-sasl-2.1.28/lib/seterror.c:144:9: branch_true: following 'true' branch (when 'pos < formatlen')...
cyrus-sasl-2.1.28/lib/seterror.c:146:12: branch_true: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:146:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/seterror.c:159:7: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:162:14: branch_true: following 'true' branch (when 'done == 0')...
cyrus-sasl-2.1.28/lib/seterror.c:164:19: branch_true: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:196:22: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  194|   
#  195|   	  case 'z': /* insert the sasl error string */
#  196|-> 	    result = _sasl_add_string(error_buf, error_buf_len,	&outlen,
#  197|   			 (char *)sasl_errstring(_sasl_seterror_usererr(
#  198|   					        va_arg(ap, int)),NULL,NULL));

Error: GCC_ANALYZER_WARNING (CWE-404): [#def61]
cyrus-sasl-2.1.28/lib/seterror.c:211:22: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
cyrus-sasl-2.1.28/lib/seterror.c:119:5: branch_false: following 'false' branch (when 'conn' is non-NULL)...
cyrus-sasl-2.1.28/lib/seterror.c:134:12: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:134:12: branch_false: following 'false' branch (when 'fmt' is non-NULL)...
cyrus-sasl-2.1.28/lib/seterror.c:138:3: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:142:3: acquire_resource: 'va_start' called here
cyrus-sasl-2.1.28/lib/seterror.c:144:9: branch_true: following 'true' branch (when 'pos < formatlen')...
cyrus-sasl-2.1.28/lib/seterror.c:146:12: branch_true: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:146:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/seterror.c:159:7: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:162:14: branch_true: following 'true' branch (when 'done == 0')...
cyrus-sasl-2.1.28/lib/seterror.c:164:19: branch_true: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:211:22: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  209|   	    
#  210|   	    /* now add the character */
#  211|-> 	    result = _sasl_add_string(error_buf, error_buf_len,
#  212|   				      &outlen, tempbuf);
#  213|   	    if (result != SASL_OK)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def62]
cyrus-sasl-2.1.28/lib/seterror.c:226:22: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
cyrus-sasl-2.1.28/lib/seterror.c:119:5: branch_false: following 'false' branch (when 'conn' is non-NULL)...
cyrus-sasl-2.1.28/lib/seterror.c:134:12: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:134:12: branch_false: following 'false' branch (when 'fmt' is non-NULL)...
cyrus-sasl-2.1.28/lib/seterror.c:138:3: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:142:3: acquire_resource: 'va_start' called here
cyrus-sasl-2.1.28/lib/seterror.c:144:9: branch_true: following 'true' branch (when 'pos < formatlen')...
cyrus-sasl-2.1.28/lib/seterror.c:146:12: branch_true: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:146:8: branch_false: following 'false' branch...
cyrus-sasl-2.1.28/lib/seterror.c:159:7: branch_false: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:162:14: branch_true: following 'true' branch (when 'done == 0')...
cyrus-sasl-2.1.28/lib/seterror.c:164:19: branch_true: ...to here
cyrus-sasl-2.1.28/lib/seterror.c:226:22: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  224|   	    snprintf(tempbuf,20,frmt,ival); /* have snprintf do the work */
#  225|   	    /* now add the string */
#  226|-> 	    result = _sasl_add_string(error_buf, error_buf_len,
#  227|   				      &outlen, tempbuf);
#  228|   	    if (result != SASL_OK)

Error: COMPILER_WARNING (CWE-477): [#def63]
cyrus-sasl-2.1.28/plugins/digestmd5.c: scope_hint: In function 'dec_3des'
cyrus-sasl-2.1.28/plugins/digestmd5.c:906:5: warning[-Wdeprecated-declarations]: 'DES_ede3_cbc_encrypt' is deprecated: Since OpenSSL 3.0
#  906 |     des_ede2_cbc_encrypt((void *) input,
#      |     ^~~~~~~~~~~~~~~~~~~~
cyrus-sasl-2.1.28/plugins/digestmd5.c:63: included_from: Included from here.
/usr/include/openssl/des.h:142:6: note: declared here
#  142 | void DES_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output,
#      |      ^~~~~~~~~~~~~~~~~~~~
#  904|       int padding, p;
#  905|       
#  906|->     des_ede2_cbc_encrypt((void *) input,
#  907|   			 (void *) output,
#  908|   			 inputlen,

Error: COMPILER_WARNING (CWE-477): [#def64]
cyrus-sasl-2.1.28/plugins/digestmd5.c:906:5: warning[-Wdeprecated-declarations]: 'DES_ede3_cbc_encrypt' is deprecated: Since OpenSSL 3.0
#  904|       int padding, p;
#  905|       
#  906|->     des_ede2_cbc_encrypt((void *) input,
#  907|   			 (void *) output,
#  908|   			 inputlen,

Error: COMPILER_WARNING (CWE-477): [#def65]
cyrus-sasl-2.1.28/plugins/digestmd5.c: scope_hint: In function 'enc_3des'
cyrus-sasl-2.1.28/plugins/digestmd5.c:954:5: warning[-Wdeprecated-declarations]: 'DES_ede3_cbc_encrypt' is deprecated: Since OpenSSL 3.0
#  954 |     des_ede2_cbc_encrypt((void *) output,
#      |     ^~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/des.h:142:6: note: declared here
#  142 | void DES_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output,
#      |      ^~~~~~~~~~~~~~~~~~~~
#  952|       len=inputlen+paddinglen+10;
#  953|       
#  954|->     des_ede2_cbc_encrypt((void *) output,
#  955|   			 (void *) output,
#  956|   			 len,

Error: COMPILER_WARNING (CWE-477): [#def66]
cyrus-sasl-2.1.28/plugins/digestmd5.c:954:5: warning[-Wdeprecated-declarations]: 'DES_ede3_cbc_encrypt' is deprecated: Since OpenSSL 3.0
#  952|       len=inputlen+paddinglen+10;
#  953|       
#  954|->     des_ede2_cbc_encrypt((void *) output,
#  955|   			 (void *) output,
#  956|   			 len,

Error: COMPILER_WARNING (CWE-477): [#def67]
cyrus-sasl-2.1.28/plugins/digestmd5.c: scope_hint: In function 'init_3des'
cyrus-sasl-2.1.28/plugins/digestmd5.c:980:5: warning[-Wdeprecated-declarations]: 'DES_key_sched' is deprecated: Since OpenSSL 3.0
#  980 |     if (des_key_sched((des_cblock *) keybuf, c->keysched) < 0)
#      |     ^~
/usr/include/openssl/des.h:188:5: note: declared here
#  188 | int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule);
#      |     ^~~~~~~~~~~~~
#  978|       /* setup enc context */
#  979|       slidebits(keybuf, enckey);
#  980|->     if (des_key_sched((des_cblock *) keybuf, c->keysched) < 0)
#  981|   	return SASL_FAIL;
#  982|   

Error: COMPILER_WARNING (CWE-477): [#def68]
cyrus-sasl-2.1.28/plugins/digestmd5.c:980:5: warning[-Wdeprecated-declarations]: 'DES_key_sched' is deprecated: Since OpenSSL 3.0
#  978|       /* setup enc context */
#  979|       slidebits(keybuf, enckey);
#  980|->     if (des_key_sched((des_cblock *) keybuf, c->keysched) < 0)
#  981|   	return SASL_FAIL;
#  982|   

Error: COMPILER_WARNING (CWE-477): [#def69]
cyrus-sasl-2.1.28/plugins/digestmd5.c:984:5: warning[-Wdeprecated-declarations]: 'DES_key_sched' is deprecated: Since OpenSSL 3.0
#  984 |     if (des_key_sched((des_cblock *) keybuf, c->keysched2) < 0)
#      |     ^~
/usr/include/openssl/des.h:188:5: note: declared here
#  188 | int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule);
#      |     ^~~~~~~~~~~~~
#  982|   
#  983|       slidebits(keybuf, enckey + 7);
#  984|->     if (des_key_sched((des_cblock *) keybuf, c->keysched2) < 0)
#  985|   	return SASL_FAIL;
#  986|       memcpy(c->ivec, ((char *) enckey) + 8, 8);

Error: COMPILER_WARNING (CWE-477): [#def70]
cyrus-sasl-2.1.28/plugins/digestmd5.c:984:5: warning[-Wdeprecated-declarations]: 'DES_key_sched' is deprecated: Since OpenSSL 3.0
#  982|   
#  983|       slidebits(keybuf, enckey + 7);
#  984|->     if (des_key_sched((des_cblock *) keybuf, c->keysched2) < 0)
#  985|   	return SASL_FAIL;
#  986|       memcpy(c->ivec, ((char *) enckey) + 8, 8);

Error: COMPILER_WARNING (CWE-477): [#def71]
cyrus-sasl-2.1.28/plugins/digestmd5.c:993:5: warning[-Wdeprecated-declarations]: 'DES_key_sched' is deprecated: Since OpenSSL 3.0
#  993 |     if (des_key_sched((des_cblock *) keybuf, c->keysched) < 0)
#      |     ^~
/usr/include/openssl/des.h:188:5: note: declared here
#  188 | int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule);
#      |     ^~~~~~~~~~~~~
#  991|       c++;
#  992|       slidebits(keybuf, deckey);
#  993|->     if (des_key_sched((des_cblock *) keybuf, c->keysched) < 0)
#  994|   	return SASL_FAIL;
#  995|       

Error: COMPILER_WARNING (CWE-477): [#def72]
cyrus-sasl-2.1.28/plugins/digestmd5.c:993:5: warning[-Wdeprecated-declarations]: 'DES_key_sched' is deprecated: Since OpenSSL 3.0
#  991|       c++;
#  992|       slidebits(keybuf, deckey);
#  993|->     if (des_key_sched((des_cblock *) keybuf, c->keysched) < 0)
#  994|   	return SASL_FAIL;
#  995|       

Error: COMPILER_WARNING (CWE-477): [#def73]
cyrus-sasl-2.1.28/plugins/digestmd5.c:997:5: warning[-Wdeprecated-declarations]: 'DES_key_sched' is deprecated: Since OpenSSL 3.0
#  997 |     if (des_key_sched((des_cblock *) keybuf, c->keysched2) < 0)
#      |     ^~
/usr/include/openssl/des.h:188:5: note: declared here
#  188 | int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule);
#      |     ^~~~~~~~~~~~~
#  995|       
#  996|       slidebits(keybuf, deckey + 7);
#  997|->     if (des_key_sched((des_cblock *) keybuf, c->keysched2) < 0)
#  998|   	return SASL_FAIL;
#  999|       

Error: COMPILER_WARNING (CWE-477): [#def74]
cyrus-sasl-2.1.28/plugins/digestmd5.c:997:5: warning[-Wdeprecated-declarations]: 'DES_key_sched' is deprecated: Since OpenSSL 3.0
#  995|       
#  996|       slidebits(keybuf, deckey + 7);
#  997|->     if (des_key_sched((des_cblock *) keybuf, c->keysched2) < 0)
#  998|   	return SASL_FAIL;
#  999|       

Error: COMPILER_WARNING (CWE-477): [#def75]
cyrus-sasl-2.1.28/plugins/digestmd5.c: scope_hint: In function 'dec_des'
cyrus-sasl-2.1.28/plugins/digestmd5.c:1024:5: warning[-Wdeprecated-declarations]: 'DES_cbc_encrypt' is deprecated: Since OpenSSL 3.0
# 1024 |     des_cbc_encrypt((void *) input,
#      |     ^~~~~~~~~~~~~~~
/usr/include/openssl/des.h:89:6: note: declared here
#   89 | void DES_cbc_encrypt(const unsigned char *input, unsigned char *output,
#      |      ^~~~~~~~~~~~~~~
# 1022|       int p, padding = 0;
# 1023|       
# 1024|->     des_cbc_encrypt((void *) input,
# 1025|   		    (void *) output,
# 1026|   		    inputlen,

Error: COMPILER_WARNING (CWE-477): [#def76]
cyrus-sasl-2.1.28/plugins/digestmd5.c:1024:5: warning[-Wdeprecated-declarations]: 'DES_cbc_encrypt' is deprecated: Since OpenSSL 3.0
# 1022|       int p, padding = 0;
# 1023|       
# 1024|->     des_cbc_encrypt((void *) input,
# 1025|   		    (void *) output,
# 1026|   		    inputlen,

Error: COMPILER_WARNING (CWE-477): [#def77]
cyrus-sasl-2.1.28/plugins/digestmd5.c: scope_hint: In function 'enc_des'
cyrus-sasl-2.1.28/plugins/digestmd5.c:1075:5: warning[-Wdeprecated-declarations]: 'DES_cbc_encrypt' is deprecated: Since OpenSSL 3.0
# 1075 |     des_cbc_encrypt((void *) output,
#      |     ^~~~~~~~~~~~~~~
/usr/include/openssl/des.h:89:6: note: declared here
#   89 | void DES_cbc_encrypt(const unsigned char *input, unsigned char *output,
#      |      ^~~~~~~~~~~~~~~
# 1073|       len = inputlen + paddinglen + 10;
# 1074|       
# 1075|->     des_cbc_encrypt((void *) output,
# 1076|                       (void *) output,
# 1077|                       len,

Error: COMPILER_WARNING (CWE-477): [#def78]
cyrus-sasl-2.1.28/plugins/digestmd5.c:1075:5: warning[-Wdeprecated-declarations]: 'DES_cbc_encrypt' is deprecated: Since OpenSSL 3.0
# 1073|       len = inputlen + paddinglen + 10;
# 1074|       
# 1075|->     des_cbc_encrypt((void *) output,
# 1076|                       (void *) output,
# 1077|                       len,

Error: COMPILER_WARNING (CWE-477): [#def79]
cyrus-sasl-2.1.28/plugins/digestmd5.c: scope_hint: In function 'init_des'
cyrus-sasl-2.1.28/plugins/digestmd5.c:1104:5: warning[-Wdeprecated-declarations]: 'DES_key_sched' is deprecated: Since OpenSSL 3.0
# 1104 |     des_key_sched((des_cblock *) keybuf, c->keysched);
#      |     ^~~~~~~~~~~~~
/usr/include/openssl/des.h:188:5: note: declared here
#  188 | int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule);
#      |     ^~~~~~~~~~~~~
# 1102|       /* setup enc context */
# 1103|       slidebits(keybuf, enckey);
# 1104|->     des_key_sched((des_cblock *) keybuf, c->keysched);
# 1105|   
# 1106|       memcpy(c->ivec, ((char *) enckey) + 8, 8);

Error: COMPILER_WARNING (CWE-477): [#def80]
cyrus-sasl-2.1.28/plugins/digestmd5.c:1104:5: warning[-Wdeprecated-declarations]: 'DES_key_sched' is deprecated: Since OpenSSL 3.0
# 1102|       /* setup enc context */
# 1103|       slidebits(keybuf, enckey);
# 1104|->     des_key_sched((des_cblock *) keybuf, c->keysched);
# 1105|   
# 1106|       memcpy(c->ivec, ((char *) enckey) + 8, 8);

Error: COMPILER_WARNING (CWE-477): [#def81]
cyrus-sasl-2.1.28/plugins/digestmd5.c:1113:5: warning[-Wdeprecated-declarations]: 'DES_key_sched' is deprecated: Since OpenSSL 3.0
# 1113 |     des_key_sched((des_cblock *) keybuf, c->keysched);
#      |     ^~~~~~~~~~~~~
/usr/include/openssl/des.h:188:5: note: declared here
#  188 | int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule);
#      |     ^~~~~~~~~~~~~
# 1111|       c++;
# 1112|       slidebits(keybuf, deckey);
# 1113|->     des_key_sched((des_cblock *) keybuf, c->keysched);
# 1114|   
# 1115|       memcpy(c->ivec, ((char *) deckey) + 8, 8);

Error: COMPILER_WARNING (CWE-477): [#def82]
cyrus-sasl-2.1.28/plugins/digestmd5.c:1113:5: warning[-Wdeprecated-declarations]: 'DES_key_sched' is deprecated: Since OpenSSL 3.0
# 1111|       c++;
# 1112|       slidebits(keybuf, deckey);
# 1113|->     des_key_sched((des_cblock *) keybuf, c->keysched);
# 1114|   
# 1115|       memcpy(c->ivec, ((char *) deckey) + 8, 8);

Error: COMPILER_WARNING (CWE-704): [#def83]
cyrus-sasl-2.1.28/plugins/gssapi.c: scope_hint: In function 'gssapi_server_mech_authneg'
cyrus-sasl-2.1.28/plugins/gssapi.c:909:35: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  909 |         cb.application_data.value = params->cbinding->data;
#      |                                   ^
#  907|       if (params->cbinding != NULL) {
#  908|           cb.application_data.length = params->cbinding->len;
#  909|->         cb.application_data.value = params->cbinding->data;
#  910|           bindings = &cb;
#  911|       }

Error: COMPILER_WARNING (CWE-704): [#def84]
cyrus-sasl-2.1.28/plugins/gssapi.c:909:35: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  907|       if (params->cbinding != NULL) {
#  908|           cb.application_data.length = params->cbinding->len;
#  909|->         cb.application_data.value = params->cbinding->data;
#  910|           bindings = &cb;
#  911|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def85]
cyrus-sasl-2.1.28/plugins/gssapi.c:1050:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
cyrus-sasl-2.1.28/plugins/gssapi.c:1426:1: enter_function: entry to 'gssapi_server_mech_step'
cyrus-sasl-2.1.28/plugins/gssapi.c:1437:8: branch_false: following 'false' branch (when 'serverout' is non-NULL)...
cyrus-sasl-2.1.28/plugins/gssapi.c:1442:5: branch_false: ...to here
cyrus-sasl-2.1.28/plugins/gssapi.c:1445:8: branch_false: following 'false' branch (when 'conn_context' is non-NULL)...
cyrus-sasl-2.1.28/plugins/gssapi.c:1447:13: branch_false: ...to here
cyrus-sasl-2.1.28/plugins/gssapi.c:1450:15: call_function: calling 'gssapi_server_mech_authneg' from 'gssapi_server_mech_step'
# 1048|   
# 1049|   	/* cut off string at '@' */
# 1050|-> 	(strchr(name_without_realm.value,'@'))[0] = '\0';
# 1051|   
# 1052|   	name_without_realm.length = strlen( (char *) name_without_realm.value );

Error: COMPILER_WARNING (CWE-704): [#def86]
cyrus-sasl-2.1.28/plugins/gssapi.c: scope_hint: In function 'gssapi_client_mech_step'
cyrus-sasl-2.1.28/plugins/gssapi.c:1828:39: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 1828 |             cb.application_data.value = params->cbinding->data;
#      |                                       ^
# 1826|           if (params->cbinding != NULL) {
# 1827|               cb.application_data.length = params->cbinding->len;
# 1828|->             cb.application_data.value = params->cbinding->data;
# 1829|               bindings = &cb;
# 1830|           }

Error: COMPILER_WARNING (CWE-704): [#def87]
cyrus-sasl-2.1.28/plugins/gssapi.c:1828:39: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 1826|           if (params->cbinding != NULL) {
# 1827|               cb.application_data.length = params->cbinding->len;
# 1828|->             cb.application_data.value = params->cbinding->data;
# 1829|               bindings = &cb;
# 1830|           }

Error: COMPILER_WARNING (CWE-252): [#def88]
cyrus-sasl-2.1.28/sample/client.c: scope_hint: In function ‘getrealm’
cyrus-sasl-2.1.28/sample/client.c:100:5: warning[-Wunused-result]: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’
#  100 |     fgets(buf, sizeof buf, stdin);
#      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   98|       printf("): ");
#   99|   
#  100|->     fgets(buf, sizeof buf, stdin);
#  101|       chop(buf);
#  102|       *result = buf;

Error: COMPILER_WARNING (CWE-252): [#def89]
cyrus-sasl-2.1.28/sample/client.c: scope_hint: In function ‘simple’
cyrus-sasl-2.1.28/sample/client.c:133:5: warning[-Wunused-result]: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’
#  133 |     fgets(b, 1024, stdin);
#      |     ^~~~~~~~~~~~~~~~~~~~~
#  131|       }
#  132|   
#  133|->     fgets(b, 1024, stdin);
#  134|       chop(b);
#  135|       *result = b;

Error: CPPCHECK_WARNING (CWE-401): [#def90]
cyrus-sasl-2.1.28/sample/client.c:169: error[memleakOnRealloc]: Common realloc mistake: 'x' nulled but not freed upon failure
#  167|       len = strlen(password);
#  168|   
#  169|->     x = (sasl_secret_t *) realloc(x, sizeof(sasl_secret_t) + len);
#  170|     
#  171|       if (!x) {

Error: COMPILER_WARNING (CWE-843): [#def91]
cyrus-sasl-2.1.28/sample/client.c:188:23: warning[-Wcast-function-type]: cast between incompatible function types from ‘int (*)(void *, int,  const char **, const char **)’ to ‘int (*)(void)’
#  188 |     SASL_CB_GETREALM, (sasl_callback_ft)&getrealm, NULL
#      |                       ^
#  186|   static sasl_callback_t callbacks[] = {
#  187|     {
#  188|->     SASL_CB_GETREALM, (sasl_callback_ft)&getrealm, NULL
#  189|     }, {
#  190|       SASL_CB_USER, (sasl_callback_ft)&simple, NULL

Error: COMPILER_WARNING (CWE-843): [#def92]
cyrus-sasl-2.1.28/sample/client.c:190:19: warning[-Wcast-function-type]: cast between incompatible function types from ‘int (*)(void *, int,  const char **, unsigned int *)’ to ‘int (*)(void)’
#  190 |     SASL_CB_USER, (sasl_callback_ft)&simple, NULL
#      |                   ^
#  188|       SASL_CB_GETREALM, (sasl_callback_ft)&getrealm, NULL
#  189|     }, {
#  190|->     SASL_CB_USER, (sasl_callback_ft)&simple, NULL
#  191|     }, {
#  192|       SASL_CB_AUTHNAME, (sasl_callback_ft)&simple, NULL

Error: COMPILER_WARNING (CWE-843): [#def93]
cyrus-sasl-2.1.28/sample/client.c:192:23: warning[-Wcast-function-type]: cast between incompatible function types from ‘int (*)(void *, int,  const char **, unsigned int *)’ to ‘int (*)(void)’
#  192 |     SASL_CB_AUTHNAME, (sasl_callback_ft)&simple, NULL
#      |                       ^
#  190|       SASL_CB_USER, (sasl_callback_ft)&simple, NULL
#  191|     }, {
#  192|->     SASL_CB_AUTHNAME, (sasl_callback_ft)&simple, NULL
#  193|     }, {
#  194|       SASL_CB_PASS, (sasl_callback_ft)&getsecret, NULL

Error: COMPILER_WARNING (CWE-843): [#def94]
cyrus-sasl-2.1.28/sample/client.c:194:19: warning[-Wcast-function-type]: cast between incompatible function types from ‘int (*)(sasl_conn_t *, void *, int,  sasl_secret_t **)’ {aka ‘int (*)(struct sasl_conn *, void *, int,  struct sasl_secret **)’} to ‘int (*)(void)’
#  194 |     SASL_CB_PASS, (sasl_callback_ft)&getsecret, NULL
#      |                   ^
#  192|       SASL_CB_AUTHNAME, (sasl_callback_ft)&simple, NULL
#  193|     }, {
#  194|->     SASL_CB_PASS, (sasl_callback_ft)&getsecret, NULL
#  195|     }, {
#  196|       SASL_CB_LIST_END, NULL, NULL

Error: GCC_ANALYZER_WARNING (CWE-775): [#def95]
cyrus-sasl-2.1.28/sample/client.c:218:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
cyrus-sasl-2.1.28/sample/client.c:209:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/client.c:214:10: branch_false: ...to here
cyrus-sasl-2.1.28/sample/client.c:214:18: branch_true: following ‘true’ branch (when ‘r’ is non-NULL)...
cyrus-sasl-2.1.28/sample/client.c:215:16: branch_true: ...to here
cyrus-sasl-2.1.28/sample/client.c:215:16: acquire_resource: socket created here
cyrus-sasl-2.1.28/sample/client.c:216:12: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
cyrus-sasl-2.1.28/sample/client.c:218:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/client.c:218:13: danger: ‘sock’ leaks here
#  216|   	if (sock < 0)
#  217|   	    continue;
#  218|-> 	if (connect(sock, r->ai_addr, r->ai_addrlen) >= 0)
#  219|   	    break;
#  220|   	close(sock);

Error: COMPILER_WARNING (CWE-252): [#def96]
cyrus-sasl-2.1.28/sample/common.c: scope_hint: In function ‘recv_string’
cyrus-sasl-2.1.28/sample/common.c:100:9: warning[-Wunused-result]: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’
#  100 |         fread(buf, buflen - 1, 1, f);
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   98|       /* read string */
#   99|       if (buflen <= len) {
#  100|-> 	fread(buf, buflen - 1, 1, f);
#  101|   	buf[buflen - 1] = '\0';
#  102|   	/* discard oversized string */

Error: COMPILER_WARNING (CWE-252): [#def97]
cyrus-sasl-2.1.28/sample/common.c:108:9: warning[-Wunused-result]: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’
#  108 |         fread(buf, len, 1, f);
#      |         ^~~~~~~~~~~~~~~~~~~~~
#  106|   	len = buflen - 1;
#  107|       } else {
#  108|-> 	fread(buf, len, 1, f);
#  109|   	buf[len] = '\0';
#  110|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
cyrus-sasl-2.1.28/sample/http_digest_client.c:37:13: warning[-Wanalyzer-malloc-leak]: leak of ‘*ilist.result’
cyrus-sasl-2.1.28/sample/http_digest_client.c:33:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/http_digest_client.c:34:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/http_digest_client.c:33:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/http_digest_client.c:34:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/http_digest_client.c:37:29: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/http_digest_client.c:37:13: danger: ‘*ilist.result’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#   35|   
#   36|   	case SASL_CB_AUTHNAME:			/* auth as current uid */
#   37|-> 	    ilist->result = strdup(getpwuid(getuid())->pw_name);
#   38|   	    break;
#   39|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
cyrus-sasl-2.1.28/sample/http_digest_client.c:42:13: warning[-Wanalyzer-malloc-leak]: leak of ‘*ilist.result’
cyrus-sasl-2.1.28/sample/http_digest_client.c:33:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/http_digest_client.c:34:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/http_digest_client.c:33:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/http_digest_client.c:34:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/http_digest_client.c:33:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/http_digest_client.c:34:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/http_digest_client.c:42:29: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/http_digest_client.c:42:13: danger: ‘*ilist.result’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#   40|   	case SASL_CB_PASS:			/* prompt for password */
#   41|   	    printf("%s: ", ilist->prompt);
#   42|-> 	    ilist->result = strdup(getpass(""));
#   43|   	    break;
#   44|   	}

Error: GCC_ANALYZER_WARNING (CWE-688): [#def100]
cyrus-sasl-2.1.28/sample/http_digest_client.c:45:22: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*ilist.result’ where non-null expected
cyrus-sasl-2.1.28/sample/http_digest_client.c:33:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/http_digest_client.c:34:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/http_digest_client.c:42:29: acquire_memory: this call could return NULL
cyrus-sasl-2.1.28/sample/http_digest_client.c:45:22: danger: argument 1 (‘*ilist.result’) from [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4) could be NULL where non-null expected
#argument 1 of ‘__builtin_strlen’ must be non-null
#   43|   	    break;
#   44|   	}
#   45|-> 	ilist->len = strlen(ilist->result);
#   46|   
#   47|   	ilist++;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def101]
cyrus-sasl-2.1.28/sample/http_digest_client.c:116:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sd’
cyrus-sasl-2.1.28/sample/http_digest_client.c:89:7: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/http_digest_client.c:94:27: branch_false: ...to here
cyrus-sasl-2.1.28/sample/http_digest_client.c:100:10: acquire_resource: stream socket created here
cyrus-sasl-2.1.28/sample/http_digest_client.c:101:8: branch_false: following ‘false’ branch (when ‘sd >= 0’)...
cyrus-sasl-2.1.28/sample/http_digest_client.c:107:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/http_digest_client.c:114:8: branch_true: following ‘true’ branch (when ‘rc < 0’)...
cyrus-sasl-2.1.28/sample/http_digest_client.c:115:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/http_digest_client.c:116:9: danger: ‘sd’ leaks here
#  114|       if (rc < 0) {
#  115|   	printf("%s: cannot bind port TCP %u\n",argv[0],port);
#  116|-> 	perror("error ");
#  117|   	exit(ERROR);
#  118|       }

Error: GCC_ANALYZER_WARNING (CWE-666): [#def102]
cyrus-sasl-2.1.28/sample/http_digest_client.c:122:10: warning[-Wanalyzer-fd-phase-mismatch]: ‘connect’ on file descriptor ‘sd’ in wrong phase
cyrus-sasl-2.1.28/sample/http_digest_client.c:89:7: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/http_digest_client.c:94:27: branch_false: ...to here
cyrus-sasl-2.1.28/sample/http_digest_client.c:100:10: acquire_resource: stream socket created here
cyrus-sasl-2.1.28/sample/http_digest_client.c:101:8: branch_false: following ‘false’ branch (when ‘sd >= 0’)...
cyrus-sasl-2.1.28/sample/http_digest_client.c:107:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/http_digest_client.c:114:8: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
cyrus-sasl-2.1.28/sample/http_digest_client.c:121:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/http_digest_client.c:122:10: danger: ‘connect’ expects a new socket file descriptor but ‘sd’ is bound
#  120|       /* connect to server */
#  121|       printf("Connect to server...\n");
#  122|->     rc = connect(sd, (struct sockaddr *) &servAddr, sizeof(servAddr));
#  123|       if (rc < 0) {
#  124|   	perror("cannot connect ");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def103]
cyrus-sasl-2.1.28/sample/http_digest_client.c:124:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sd’
cyrus-sasl-2.1.28/sample/http_digest_client.c:89:7: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/http_digest_client.c:94:27: branch_false: ...to here
cyrus-sasl-2.1.28/sample/http_digest_client.c:100:10: acquire_resource: stream socket created here
cyrus-sasl-2.1.28/sample/http_digest_client.c:101:8: branch_false: following ‘false’ branch (when ‘sd >= 0’)...
cyrus-sasl-2.1.28/sample/http_digest_client.c:107:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/http_digest_client.c:114:8: branch_false: following ‘false’ branch (when ‘rc >= 0’)...
cyrus-sasl-2.1.28/sample/http_digest_client.c:121:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/http_digest_client.c:123:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/http_digest_client.c:124:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/http_digest_client.c:124:9: danger: ‘sd’ leaks here
#  122|       rc = connect(sd, (struct sockaddr *) &servAddr, sizeof(servAddr));
#  123|       if (rc < 0) {
#  124|-> 	perror("cannot connect ");
#  125|   	exit(ERROR);
#  126|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
cyrus-sasl-2.1.28/sample/server.c:149:13: warning[-Wanalyzer-malloc-leak]: leak of ‘socks’
cyrus-sasl-2.1.28/sample/server.c:128:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:134:20: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:136:13: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/server.c:137:8: branch_false: following ‘false’ branch (when ‘socks’ is non-NULL)...
cyrus-sasl-2.1.28/sample/server.c:143:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:145:18: branch_true: following ‘true’ branch (when ‘r’ is non-NULL)...
cyrus-sasl-2.1.28/sample/server.c:146:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:148:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:149:13: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:149:13: danger: ‘socks’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  147|   	*sock = socket(r->ai_family, r->ai_socktype, r->ai_protocol);
#  148|   	if (*sock < 0) {
#  149|-> 	    perror("socket");
#  150|   	    continue;
#  151|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
cyrus-sasl-2.1.28/sample/server.c:154:13: warning[-Wanalyzer-malloc-leak]: leak of ‘socks’
cyrus-sasl-2.1.28/sample/server.c:128:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:134:20: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:136:13: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/server.c:137:8: branch_false: following ‘false’ branch (when ‘socks’ is non-NULL)...
cyrus-sasl-2.1.28/sample/server.c:143:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:145:18: branch_true: following ‘true’ branch (when ‘r’ is non-NULL)...
cyrus-sasl-2.1.28/sample/server.c:146:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:148:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:152:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:152:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:154:13: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:154:13: danger: ‘socks’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  152|   	if (setsockopt(*sock, SOL_SOCKET, SO_REUSEADDR, 
#  153|   		       (void *) &on, sizeof(on)) < 0) {
#  154|-> 	    perror("setsockopt(SO_REUSEADDR)");
#  155|   	    close(*sock);
#  156|   	    continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
cyrus-sasl-2.1.28/sample/server.c:155:13: warning[-Wanalyzer-malloc-leak]: leak of ‘socks’
cyrus-sasl-2.1.28/sample/server.c:128:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:134:20: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:136:13: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/server.c:137:8: branch_false: following ‘false’ branch (when ‘socks’ is non-NULL)...
cyrus-sasl-2.1.28/sample/server.c:143:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:145:18: branch_true: following ‘true’ branch (when ‘r’ is non-NULL)...
cyrus-sasl-2.1.28/sample/server.c:146:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:148:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:152:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:152:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:154:13: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:155:13: danger: ‘socks’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  153|   		       (void *) &on, sizeof(on)) < 0) {
#  154|   	    perror("setsockopt(SO_REUSEADDR)");
#  155|-> 	    close(*sock);
#  156|   	    continue;
#  157|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
cyrus-sasl-2.1.28/sample/server.c:169:13: warning[-Wanalyzer-malloc-leak]: leak of ‘socks’
cyrus-sasl-2.1.28/sample/server.c:128:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:134:20: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:136:13: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/server.c:137:8: branch_false: following ‘false’ branch (when ‘socks’ is non-NULL)...
cyrus-sasl-2.1.28/sample/server.c:143:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:145:18: branch_true: following ‘true’ branch (when ‘r’ is non-NULL)...
cyrus-sasl-2.1.28/sample/server.c:146:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:148:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:152:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:152:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:168:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:168:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:169:13: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:169:13: danger: ‘socks’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  167|   #endif
#  168|   	if (bind(*sock, r->ai_addr, r->ai_addrlen) < 0) {
#  169|-> 	    perror("bind");
#  170|   	    close(*sock);
#  171|   	    continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
cyrus-sasl-2.1.28/sample/server.c:170:13: warning[-Wanalyzer-malloc-leak]: leak of ‘socks’
cyrus-sasl-2.1.28/sample/server.c:128:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:134:20: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:136:13: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/server.c:137:8: branch_false: following ‘false’ branch (when ‘socks’ is non-NULL)...
cyrus-sasl-2.1.28/sample/server.c:143:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:145:18: branch_true: following ‘true’ branch (when ‘r’ is non-NULL)...
cyrus-sasl-2.1.28/sample/server.c:146:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:148:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:152:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:152:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:168:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:168:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:169:13: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:170:13: danger: ‘socks’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  168|   	if (bind(*sock, r->ai_addr, r->ai_addrlen) < 0) {
#  169|   	    perror("bind");
#  170|-> 	    close(*sock);
#  171|   	    continue;
#  172|    	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def109]
cyrus-sasl-2.1.28/sample/server.c:175:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘socket(*r.ai_family, *r.ai_socktype, *r.ai_protocol)’
cyrus-sasl-2.1.28/sample/server.c:128:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:134:20: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:137:8: branch_false: following ‘false’ branch (when ‘socks’ is non-NULL)...
cyrus-sasl-2.1.28/sample/server.c:143:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:145:18: branch_true: following ‘true’ branch (when ‘r’ is non-NULL)...
cyrus-sasl-2.1.28/sample/server.c:146:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:147:17: acquire_resource: socket created here
cyrus-sasl-2.1.28/sample/server.c:148:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:152:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:152:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:168:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:168:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:174:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:174:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:175:13: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:175:13: danger: ‘socket(*r.ai_family, *r.ai_socktype, *r.ai_protocol)’ leaks here
#  173|   
#  174|    	if (listen(*sock, 5) < 0) {
#  175|->  	    perror("listen");
#  176|    	    close(*sock);
#  177|    	    continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
cyrus-sasl-2.1.28/sample/server.c:175:13: warning[-Wanalyzer-malloc-leak]: leak of ‘socks’
cyrus-sasl-2.1.28/sample/server.c:128:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:134:20: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:136:13: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/server.c:137:8: branch_false: following ‘false’ branch (when ‘socks’ is non-NULL)...
cyrus-sasl-2.1.28/sample/server.c:143:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:145:18: branch_true: following ‘true’ branch (when ‘r’ is non-NULL)...
cyrus-sasl-2.1.28/sample/server.c:146:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:148:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:152:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:152:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:168:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:168:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:174:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:174:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:175:13: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:175:13: danger: ‘socks’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  173|   
#  174|    	if (listen(*sock, 5) < 0) {
#  175|->  	    perror("listen");
#  176|    	    close(*sock);
#  177|    	    continue;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def111]
cyrus-sasl-2.1.28/sample/server.c:176:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor
cyrus-sasl-2.1.28/sample/server.c:128:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:134:20: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:137:8: branch_false: following ‘false’ branch (when ‘socks’ is non-NULL)...
cyrus-sasl-2.1.28/sample/server.c:143:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:145:18: branch_true: following ‘true’ branch (when ‘r’ is non-NULL)...
cyrus-sasl-2.1.28/sample/server.c:146:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:147:17: acquire_resource: socket created here
cyrus-sasl-2.1.28/sample/server.c:148:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:152:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:152:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:168:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:168:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:174:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:174:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:175:13: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:176:13: danger: leaks here
#  174|    	if (listen(*sock, 5) < 0) {
#  175|    	    perror("listen");
#  176|->  	    close(*sock);
#  177|    	    continue;
#  178|    	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def112]
cyrus-sasl-2.1.28/sample/server.c:176:13: warning[-Wanalyzer-malloc-leak]: leak of ‘socks’
cyrus-sasl-2.1.28/sample/server.c:128:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:134:20: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:136:13: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/server.c:137:8: branch_false: following ‘false’ branch (when ‘socks’ is non-NULL)...
cyrus-sasl-2.1.28/sample/server.c:143:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:145:18: branch_true: following ‘true’ branch (when ‘r’ is non-NULL)...
cyrus-sasl-2.1.28/sample/server.c:146:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:148:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:152:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:152:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:168:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:168:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:174:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:174:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:175:13: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:176:13: danger: ‘socks’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  174|    	if (listen(*sock, 5) < 0) {
#  175|    	    perror("listen");
#  176|->  	    close(*sock);
#  177|    	    continue;
#  178|    	}

Error: CPPCHECK_WARNING (CWE-476): [#def113]
cyrus-sasl-2.1.28/sample/server.c:221: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#  219|   	dprintf(2, "forcing use of mechanism %s\n", mech);
#  220|   	data = strdup(mech);
#  221|-> 	len = strlen(data);
#  222|       } else {
#  223|   	int count;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def114]
cyrus-sasl-2.1.28/sample/server.c:221:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘data’ where non-null expected
cyrus-sasl-2.1.28/sample/server.c:218:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:219:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:220:16: acquire_memory: this call could return NULL
cyrus-sasl-2.1.28/sample/server.c:221:15: danger: argument 1 (‘strdup(mech)’) from [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#argument 1 of ‘__builtin_strlen’ must be non-null
#  219|   	dprintf(2, "forcing use of mechanism %s\n", mech);
#  220|   	data = strdup(mech);
#  221|-> 	len = strlen(data);
#  222|       } else {
#  223|   	int count;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def115]
cyrus-sasl-2.1.28/sample/server.c:233:5: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
cyrus-sasl-2.1.28/sample/server.c:218:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:219:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:220:16: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/server.c:233:5: danger: ‘data’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#  231|   
#  232|       /* send capability list to client */
#  233|->     send_string(out, data, len);
#  234|       if (mech)
#  235|   	free((void *) data);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def116]
cyrus-sasl-2.1.28/sample/server.c:237:5: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
cyrus-sasl-2.1.28/sample/server.c:218:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:219:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:220:16: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/server.c:234:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:237:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:237:5: danger: ‘data’ leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
#  235|   	free((void *) data);
#  236|   
#  237|->     dprintf(1, "waiting for client mechanism...\n");
#  238|       len = recv_string(in, chosenmech, sizeof chosenmech);
#  239|       if (len <= 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def117]
cyrus-sasl-2.1.28/sample/server.c:238:11: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
cyrus-sasl-2.1.28/sample/server.c:218:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:219:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:220:16: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/server.c:234:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:237:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:238:11: danger: ‘data’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
#  236|   
#  237|       dprintf(1, "waiting for client mechanism...\n");
#  238|->     len = recv_string(in, chosenmech, sizeof chosenmech);
#  239|       if (len <= 0) {
#  240|   	printf("client didn't choose mechanism\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def118]
cyrus-sasl-2.1.28/sample/server.c:242:9: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
cyrus-sasl-2.1.28/sample/server.c:218:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:219:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:220:16: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/server.c:234:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:237:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:239:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:240:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:242:9: danger: ‘data’ leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
#  240|   	printf("client didn't choose mechanism\n");
#  241|   	fputc('N', out); /* send NO to client */
#  242|-> 	fflush(out);
#  243|   	return -1;
#  244|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def119]
cyrus-sasl-2.1.28/sample/server.c:243:16: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
cyrus-sasl-2.1.28/sample/server.c:218:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:219:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:220:16: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/server.c:234:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:237:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:243:16: danger: ‘data’ leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
#  241|   	fputc('N', out); /* send NO to client */
#  242|   	fflush(out);
#  243|-> 	return -1;
#  244|       }
#  245|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def120]
cyrus-sasl-2.1.28/sample/server.c:249:9: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
cyrus-sasl-2.1.28/sample/server.c:218:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:219:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:220:16: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/server.c:234:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:237:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:239:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:246:9: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:246:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:249:9: danger: ‘data’ leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
#  247|   	printf("client didn't choose mandatory mechanism\n");
#  248|   	fputc('N', out); /* send NO to client */
#  249|-> 	fflush(out);
#  250|   	return -1;
#  251|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def121]
cyrus-sasl-2.1.28/sample/server.c:253:11: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
cyrus-sasl-2.1.28/sample/server.c:218:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:219:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:220:16: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/server.c:234:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:237:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:239:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:246:9: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:253:11: danger: ‘data’ leaks here; was allocated at [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2)
#  251|       }
#  252|   
#  253|->     len = recv_string(in, buf, sizeof(buf));
#  254|       if(len != 1) {
#  255|   	saslerr(r, "didn't receive first-send parameter correctly");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def122]
cyrus-sasl-2.1.28/sample/server.c:255:9: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
cyrus-sasl-2.1.28/sample/server.c:218:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:219:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:220:16: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/server.c:234:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:237:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:239:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:246:9: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:254:7: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:255:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:255:9: danger: ‘data’ leaks here; was allocated at [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
#  253|       len = recv_string(in, buf, sizeof(buf));
#  254|       if(len != 1) {
#  255|-> 	saslerr(r, "didn't receive first-send parameter correctly");
#  256|   	fputc('N', out);
#  257|   	fflush(out);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
cyrus-sasl-2.1.28/sample/server.c:257:9: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
cyrus-sasl-2.1.28/sample/server.c:218:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:219:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:220:16: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/server.c:234:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:237:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:239:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:246:9: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:254:7: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:255:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:257:9: danger: ‘data’ leaks here; was allocated at [(3)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/2)
#  255|   	saslerr(r, "didn't receive first-send parameter correctly");
#  256|   	fputc('N', out);
#  257|-> 	fflush(out);
#  258|   	return -1;
#  259|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
cyrus-sasl-2.1.28/sample/server.c:263:15: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
cyrus-sasl-2.1.28/sample/server.c:218:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:219:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:220:16: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/server.c:234:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:237:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:239:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:246:9: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:254:7: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:261:8: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:261:7: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:263:15: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:263:15: danger: ‘data’ leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
#  261|       if(buf[0] == 'Y') {
#  262|           /* receive initial response (if any) */
#  263|->         len = recv_string(in, buf, sizeof(buf));
#  264|   
#  265|           /* start libsasl negotiation */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
cyrus-sasl-2.1.28/sample/server.c:266:13: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
cyrus-sasl-2.1.28/sample/server.c:218:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:219:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:220:16: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/server.c:234:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:237:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:239:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:246:9: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:254:7: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:261:8: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:261:7: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:263:15: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:266:13: danger: ‘data’ leaks here; was allocated at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2)
#  264|   
#  265|           /* start libsasl negotiation */
#  266|->         r = sasl_server_start(conn, chosenmech, buf, len,
#  267|   			      &data, (unsigned int *) &len);
#  268|       } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
cyrus-sasl-2.1.28/sample/server.c:269:13: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
cyrus-sasl-2.1.28/sample/server.c:218:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/sample/server.c:219:9: branch_true: ...to here
cyrus-sasl-2.1.28/sample/server.c:220:16: acquire_memory: allocated here
cyrus-sasl-2.1.28/sample/server.c:234:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:237:5: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:239:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:246:9: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:254:7: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:261:8: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:261:7: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/sample/server.c:269:13: branch_false: ...to here
cyrus-sasl-2.1.28/sample/server.c:269:13: danger: ‘data’ leaks here; was allocated at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
#  267|   			      &data, (unsigned int *) &len);
#  268|       } else {
#  269|-> 	r = sasl_server_start(conn, chosenmech, NULL, 0,
#  270|   			      &data, (unsigned int *) &len);
#  271|       }

Error: COMPILER_WARNING: [#def127]
cyrus-sasl-2.1.28/sample/server.c: scope_hint: In function ‘displayStatus_1’
cyrus-sasl-2.1.28/sample/server.c:511:13: warning[-Wold-style-definition]: old-style function definition
#  511 | static void displayStatus_1(m, code, type)
#      |             ^~~~~~~~~~~~~~~
#  509|   
#  510|   #ifdef HAVE_GSS_GET_NAME_ATTRIBUTE
#  511|-> static void displayStatus_1(m, code, type)
#  512|       char *m;
#  513|       OM_uint32 code;

Error: COMPILER_WARNING: [#def128]
cyrus-sasl-2.1.28/sample/server.c:511:13: warning[-Wold-style-definition]: old-style function definition
#  509|   
#  510|   #ifdef HAVE_GSS_GET_NAME_ATTRIBUTE
#  511|-> static void displayStatus_1(m, code, type)
#  512|       char *m;
#  513|       OM_uint32 code;

Error: COMPILER_WARNING: [#def129]
cyrus-sasl-2.1.28/sample/server.c: scope_hint: In function ‘displayStatus’
cyrus-sasl-2.1.28/sample/server.c:533:13: warning[-Wold-style-definition]: old-style function definition
#  533 | static void displayStatus(msg, maj_stat, min_stat)
#      |             ^~~~~~~~~~~~~
#  531|   }
#  532|   
#  533|-> static void displayStatus(msg, maj_stat, min_stat)
#  534|       char *msg;
#  535|       OM_uint32 maj_stat;

Error: COMPILER_WARNING: [#def130]
cyrus-sasl-2.1.28/sample/server.c:533:13: warning[-Wold-style-definition]: old-style function definition
#  531|   }
#  532|   
#  533|-> static void displayStatus(msg, maj_stat, min_stat)
#  534|       char *msg;
#  535|       OM_uint32 maj_stat;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def131]
cyrus-sasl-2.1.28/saslauthd/auth_httpform.c:375:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  373|       http_response_code = strpbrk(http_response, SPACE) + 1;
#  374|       http_response_string = strpbrk(http_response_code, SPACE) + 1;
#  375|->     *(http_response_string-1) = '\0';  /* replace space after code with 0 */
#  376|   
#  377|       if (!strcmp(http_response_code, HTTP_STATUS_SUCCESS) ||

Error: GCC_ANALYZER_WARNING (CWE-775): [#def132]
cyrus-sasl-2.1.28/saslauthd/auth_httpform.c:520:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
cyrus-sasl-2.1.28/saslauthd/auth_httpform.c:512:5: branch_true: following ‘true’ branch (when ‘user’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/auth_httpform.c:513:5: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_httpform.c:513:5: branch_true: following ‘true’ branch (when ‘password’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/auth_httpform.c:516:10: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_httpform.c:516:18: branch_true: following ‘true’ branch (when ‘r’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/auth_httpform.c:517:13: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_httpform.c:517:13: acquire_resource: socket created here
cyrus-sasl-2.1.28/saslauthd/auth_httpform.c:518:12: branch_false: following ‘false’ branch (when ‘s >= 0’)...
cyrus-sasl-2.1.28/saslauthd/auth_httpform.c:520:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_httpform.c:520:13: danger: ‘s’ leaks here
#  518|           if (s < 0)
#  519|               continue;
#  520|->         if (connect(s, r->ai_addr, r->ai_addrlen) >= 0)
#  521|               break;
#  522|           close(s);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:155:26: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:162:1: enter_function: entry to ‘auth_krb5’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:184:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:189:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:189:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: call_function: calling ‘form_principal_name’ from ‘auth_krb5’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: return_function: returning to ‘auth_krb5’ from ‘form_principal_name’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:200:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:200:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:206:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:206:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:219:10: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:222:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:229:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:229:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:239:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:239:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:251:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:254:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:255:18: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:255:18: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:256:9: call_function: calling ‘k5support_log_err’ from ‘auth_krb5’
#  153|                                 char const *msg)
#  154|   {
#  155|->     const char *k5_msg = krb5_get_error_message(context, code);
#  156|   
#  157|       syslog(priority, "auth_krb5: %s: %s (%d)\n", msg, k5_msg, code);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:157:5: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:162:1: enter_function: entry to ‘auth_krb5’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:184:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:189:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:189:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: call_function: calling ‘form_principal_name’ from ‘auth_krb5’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: return_function: returning to ‘auth_krb5’ from ‘form_principal_name’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:200:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:200:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:206:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:206:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:219:10: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:222:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:229:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:229:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:239:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:239:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:251:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:254:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:255:18: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:255:18: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:256:9: call_function: calling ‘k5support_log_err’ from ‘auth_krb5’
#  155|       const char *k5_msg = krb5_get_error_message(context, code);
#  156|   
#  157|->     syslog(priority, "auth_krb5: %s: %s (%d)\n", msg, k5_msg, code);
#  158|       krb5_free_error_message(context, k5_msg);
#  159|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:158:5: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:162:1: enter_function: entry to ‘auth_krb5’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:184:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:189:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:189:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: call_function: calling ‘form_principal_name’ from ‘auth_krb5’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: return_function: returning to ‘auth_krb5’ from ‘form_principal_name’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:200:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:200:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:206:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:206:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:219:10: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:222:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:229:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:229:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:239:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:239:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:251:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:254:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:255:18: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:255:18: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:256:9: call_function: calling ‘k5support_log_err’ from ‘auth_krb5’
#  156|   
#  157|       syslog(priority, "auth_krb5: %s: %s (%d)\n", msg, k5_msg, code);
#  158|->     krb5_free_error_message(context, k5_msg);
#  159|   }
#  160|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def136]
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:261:5: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:162:1: enter_function: entry to ‘auth_krb5’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:184:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:189:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:189:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: call_function: calling ‘form_principal_name’ from ‘auth_krb5’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: return_function: returning to ‘auth_krb5’ from ‘form_principal_name’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:200:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:200:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:206:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:206:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:219:10: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:222:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:229:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:229:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:239:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:239:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:251:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:254:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:258:18: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:258:18: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:261:5: danger: ‘result’ leaks here; was allocated at [(25)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/24)
#  259|       }
#  260|   
#  261|->     krb5_free_principal(context, auth_user);
#  262|       krb5_free_principal(context, server);
#  263|       krb5_free_cred_contents(context, &cred);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:262:5: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:162:1: enter_function: entry to ‘auth_krb5’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:184:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:189:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:189:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: call_function: calling ‘form_principal_name’ from ‘auth_krb5’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: return_function: returning to ‘auth_krb5’ from ‘form_principal_name’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:200:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:200:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:206:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:206:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:219:10: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:222:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:229:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:229:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:239:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:239:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:251:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:254:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:258:18: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:258:18: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:262:5: danger: ‘result’ leaks here; was allocated at [(25)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/24)
#  260|   
#  261|       krb5_free_principal(context, auth_user);
#  262|->     krb5_free_principal(context, server);
#  263|       krb5_free_cred_contents(context, &cred);
#  264|       if (kt) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def138]
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:263:5: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:162:1: enter_function: entry to ‘auth_krb5’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:184:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:189:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:189:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: call_function: calling ‘form_principal_name’ from ‘auth_krb5’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: return_function: returning to ‘auth_krb5’ from ‘form_principal_name’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:200:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:200:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:206:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:206:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:219:10: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:222:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:229:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:229:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:239:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:239:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:251:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:254:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:258:18: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:258:18: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:263:5: danger: ‘result’ leaks here; was allocated at [(25)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/24)
#  261|       krb5_free_principal(context, auth_user);
#  262|       krb5_free_principal(context, server);
#  263|->     krb5_free_cred_contents(context, &cred);
#  264|       if (kt) {
#  265|           krb5_kt_close(context, kt);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def139]
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:265:9: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:162:1: enter_function: entry to ‘auth_krb5’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:184:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:189:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:189:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: call_function: calling ‘form_principal_name’ from ‘auth_krb5’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: return_function: returning to ‘auth_krb5’ from ‘form_principal_name’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:200:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:200:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:206:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:206:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:219:10: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:222:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:229:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:229:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:230:19: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:230:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:239:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:239:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:251:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:254:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:258:18: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:258:18: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:264:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:265:9: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:265:9: danger: ‘result’ leaks here; was allocated at [(27)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/26)
#  263|       krb5_free_cred_contents(context, &cred);
#  264|       if (kt) {
#  265|->         krb5_kt_close(context, kt);
#  266|       }
#  267|       krb5_free_context(context);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def140]
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:267:5: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:162:1: enter_function: entry to ‘auth_krb5’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:184:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:189:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:189:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: call_function: calling ‘form_principal_name’ from ‘auth_krb5’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:9: return_function: returning to ‘auth_krb5’ from ‘form_principal_name’
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:194:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:200:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:200:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:206:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:206:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:219:10: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:222:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:229:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:229:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:239:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:239:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:251:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:254:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:258:18: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:258:18: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:264:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:267:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_krb5.c:267:5: danger: ‘result’ leaks here; was allocated at [(25)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/24)
#  265|           krb5_kt_close(context, kt);
#  266|       }
#  267|->     krb5_free_context(context);
#  268|   
#  269|       return result;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def141]
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:117:17: warning[-Wanalyzer-malloc-leak]: leak of ‘my_resp’
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:100:15: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:101:8: branch_false: following ‘false’ branch (when ‘my_resp’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:104:17: branch_true: following ‘true’ branch (when ‘i < num_msg’)...
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:105:20: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:116:16: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:117:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:117:17: danger: ‘my_resp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  115|   	    my_resp[i].resp = strdup(my_appdata->password);
#  116|   	    if (my_resp[i].resp == NULL) {
#  117|-> 		syslog(LOG_DEBUG, "DEBUG: saslauthd_pam_conv: strdup failed");
#  118|   		goto ret_error;
#  119|   	    }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def142]
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:126:18: warning[-Wanalyzer-malloc-leak]: leak of ‘my_resp’
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:100:15: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:101:8: branch_false: following ‘false’ branch (when ‘my_resp’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:104:17: branch_true: following ‘true’ branch (when ‘i < num_msg’)...
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:105:20: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:126:18: danger: ‘my_resp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  124|   	    /* Recheck setting each time, as it might have been changed
#  125|   	       in the mean-while. */
#  126|-> 	    rc = pam_get_item(my_appdata->pamh, PAM_USER_PROMPT,
#  127|   			      (void *) &login_prompt);
#  128|   	    if (rc != PAM_SUCCESS) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def143]
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:129:17: warning[-Wanalyzer-malloc-leak]: leak of ‘my_resp’
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:100:15: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:101:8: branch_false: following ‘false’ branch (when ‘my_resp’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:104:17: branch_true: following ‘true’ branch (when ‘i < num_msg’)...
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:105:20: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:128:16: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:129:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:129:17: danger: ‘my_resp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  127|   			      (void *) &login_prompt);
#  128|   	    if (rc != PAM_SUCCESS) {
#  129|-> 		syslog(LOG_DEBUG, "DEBUG: saslauthd_pam_conv: unable to read "
#  130|   		       "login prompt string: %s",
#  131|   		       pam_strerror(my_appdata->pamh, rc));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def144]
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:139:17: warning[-Wanalyzer-malloc-leak]: leak of ‘my_resp’
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:100:15: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:101:8: branch_false: following ‘false’ branch (when ‘my_resp’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:104:17: branch_true: following ‘true’ branch (when ‘i < num_msg’)...
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:105:20: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:128:16: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:135:17: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:135:16: branch_false: following ‘false’ branch (when the strings are non-equal)...
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:139:17: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_pam.c:139:17: danger: ‘my_resp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  137|   		my_resp[i].resp_retcode = PAM_SUCCESS;
#  138|   	    } else {			/* ignore */
#  139|-> 		syslog(LOG_DEBUG, "DEBUG: saslauthd_pam_conv: unknown prompt "
#  140|   		       "string: %s", msg[i]->msg);
#  141|   		my_resp[i].resp = NULL;

Error: GCC_ANALYZER_WARNING (CWE-127): [#def145]
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:423:16: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:445:1: enter_function: entry to ‘auth_rimap’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:470:5: branch_true: following ‘true’ branch (when ‘login’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:471:5: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:471:5: branch_true: following ‘true’ branch (when ‘password’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:474:10: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:476:12: branch_false: following ‘false’ branch (when ‘s >= 0’)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:478:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:497:8: branch_false: following ‘false’ branch (when ‘s >= 0’)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:517:12: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:522:10: call_function: calling ‘read_response’ from ‘auth_rimap’
#  421|           }
#  422|       } while (rc < buflen &&
#  423|->              ( rbuf[rc-1] != '\n' || !memmem(rbuf, rc, tag, strlen(tag)) ));
#  424|   
#  425|       return rc;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def146]
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:478:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:470:5: branch_true: following ‘true’ branch (when ‘login’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:471:5: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:471:5: branch_true: following ‘true’ branch (when ‘password’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:474:10: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:474:18: branch_true: following ‘true’ branch (when ‘r’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:475:13: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:475:13: acquire_resource: socket created here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:476:12: branch_false: following ‘false’ branch (when ‘s >= 0’)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:478:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:478:13: danger: ‘s’ leaks here
#  476|   	if (s < 0)
#  477|   	    continue;
#  478|-> 	if (connect(s, r->ai_addr, r->ai_addrlen) >= 0)
#  479|   	    break;
#  480|   	close(s);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def147]
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:591:9: warning[-Wanalyzer-malloc-leak]: leak of ‘qstring(login)’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:445:1: enter_function: entry to ‘auth_rimap’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:470:5: branch_true: following ‘true’ branch (when ‘login’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:471:5: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:471:5: branch_true: following ‘true’ branch (when ‘password’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:474:10: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:476:12: branch_false: following ‘false’ branch (when ‘s >= 0’)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:478:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:497:8: branch_false: following ‘false’ branch (when ‘s >= 0’)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:517:12: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:522:10: call_function: calling ‘read_response’ from ‘auth_rimap’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:522:10: return_function: returning to ‘auth_rimap’ from ‘read_response’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:523:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:528:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:528:13: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:534:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:540:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:544:10: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:544:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:548:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:548:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:558:14: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:558:14: call_function: calling ‘qstring’ from ‘auth_rimap’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:558:14: return_function: returning to ‘auth_rimap’ from ‘qstring’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:559:13: call_function: calling ‘qstring’ from ‘auth_rimap’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:559:13: return_function: returning to ‘auth_rimap’ from ‘qstring’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:560:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:569:8: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:569:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:579:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:590:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:591:9: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:591:9: danger: ‘qstring(login)’ leaks here; was allocated at [(28)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/27)
#  589|   
#  590|       if (flags & VERBOSE) {
#  591|-> 	syslog(LOG_DEBUG, "auth_rimap: sending %s%s %s",
#  592|   	       LOGIN_CMD, qlogin, qpass);
#  593|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def148]
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:591:9: warning[-Wanalyzer-malloc-leak]: leak of ‘qstring(password)’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:445:1: enter_function: entry to ‘auth_rimap’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:470:5: branch_true: following ‘true’ branch (when ‘login’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:471:5: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:471:5: branch_true: following ‘true’ branch (when ‘password’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:474:10: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:476:12: branch_false: following ‘false’ branch (when ‘s >= 0’)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:478:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:497:8: branch_false: following ‘false’ branch (when ‘s >= 0’)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:517:12: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:522:10: call_function: calling ‘read_response’ from ‘auth_rimap’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:522:10: return_function: returning to ‘auth_rimap’ from ‘read_response’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:523:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:528:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:528:13: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:534:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:540:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:544:10: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:544:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:548:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:548:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:558:14: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:558:14: call_function: calling ‘qstring’ from ‘auth_rimap’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:558:14: return_function: returning to ‘auth_rimap’ from ‘qstring’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:559:13: call_function: calling ‘qstring’ from ‘auth_rimap’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:559:13: return_function: returning to ‘auth_rimap’ from ‘qstring’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:560:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:569:8: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:569:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:579:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:590:8: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:591:9: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:591:9: danger: ‘qstring(password)’ leaks here; was allocated at [(35)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/34)
#  589|   
#  590|       if (flags & VERBOSE) {
#  591|-> 	syslog(LOG_DEBUG, "auth_rimap: sending %s%s %s",
#  592|   	       LOGIN_CMD, qlogin, qpass);
#  593|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def149]
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:595:10: warning[-Wanalyzer-malloc-leak]: leak of ‘qstring(login)’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:445:1: enter_function: entry to ‘auth_rimap’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:470:5: branch_true: following ‘true’ branch (when ‘login’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:471:5: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:471:5: branch_true: following ‘true’ branch (when ‘password’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:474:10: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:476:12: branch_false: following ‘false’ branch (when ‘s >= 0’)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:478:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:497:8: branch_false: following ‘false’ branch (when ‘s >= 0’)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:517:12: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:522:10: call_function: calling ‘read_response’ from ‘auth_rimap’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:522:10: return_function: returning to ‘auth_rimap’ from ‘read_response’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:523:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:528:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:528:13: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:534:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:540:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:544:10: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:544:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:548:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:548:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:558:14: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:558:14: call_function: calling ‘qstring’ from ‘auth_rimap’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:558:14: return_function: returning to ‘auth_rimap’ from ‘qstring’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:559:13: call_function: calling ‘qstring’ from ‘auth_rimap’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:559:13: return_function: returning to ‘auth_rimap’ from ‘qstring’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:560:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:569:8: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:569:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:579:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:590:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:594:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:595:10: danger: ‘qstring(login)’ leaks here; was allocated at [(28)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/27)
#  593|       }
#  594|       alarm(NETWORK_IO_TIMEOUT);
#  595|->     rc = retry_writev(s, iov, 5);
#  596|       alarm(0);
#  597|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def150]
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:595:10: warning[-Wanalyzer-malloc-leak]: leak of ‘qstring(password)’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:445:1: enter_function: entry to ‘auth_rimap’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:470:5: branch_true: following ‘true’ branch (when ‘login’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:471:5: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:471:5: branch_true: following ‘true’ branch (when ‘password’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:474:10: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:476:12: branch_false: following ‘false’ branch (when ‘s >= 0’)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:478:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:497:8: branch_false: following ‘false’ branch (when ‘s >= 0’)...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:517:12: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:522:10: call_function: calling ‘read_response’ from ‘auth_rimap’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:522:10: return_function: returning to ‘auth_rimap’ from ‘read_response’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:523:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:528:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:528:13: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:534:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:540:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:544:10: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:544:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:548:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:548:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:558:14: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:558:14: call_function: calling ‘qstring’ from ‘auth_rimap’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:558:14: return_function: returning to ‘auth_rimap’ from ‘qstring’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:559:13: call_function: calling ‘qstring’ from ‘auth_rimap’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:559:13: return_function: returning to ‘auth_rimap’ from ‘qstring’
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:560:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:569:8: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:569:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:579:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:590:8: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:594:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/auth_rimap.c:595:10: danger: ‘qstring(password)’ leaks here; was allocated at [(35)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/34)
#  593|       }
#  594|       alarm(NETWORK_IO_TIMEOUT);
#  595|->     rc = retry_writev(s, iov, 5);
#  596|       alarm(0);
#  597|   

Error: COMPILER_WARNING (CWE-704): [#def151]
cyrus-sasl-2.1.28/saslauthd/cache.c: scope_hint: In function ‘cache_lookup’
cyrus-sasl-2.1.28/saslauthd/cache.c:215:44: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘_saslauthd_MD5Update’ discards ‘const’ qualifier from pointer target type
#  215 |         _saslauthd_MD5Update(&md5_context, password, strlen(password));
#      |                                            ^~~~~~~~
cyrus-sasl-2.1.28/saslauthd/cache.c:58: included_from: Included from here.
cyrus-sasl-2.1.28/saslauthd/saslauthd_md5.h:33:39: note: expected ‘unsigned char *’ but argument is of type ‘const char *’
#   33 | void _saslauthd_MD5Update (MD5_CTX *, unsigned char *, unsigned int);
#      |                                       ^~~~~~~~~~~~~~~
#  213|   
#  214|   	_saslauthd_MD5Init(&md5_context);
#  215|-> 	_saslauthd_MD5Update(&md5_context, password, strlen(password));
#  216|   	_saslauthd_MD5Final(pwd_digest, &md5_context);
#  217|   

Error: COMPILER_WARNING (CWE-704): [#def152]
cyrus-sasl-2.1.28/saslauthd/cache.c:215:44: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘_saslauthd_MD5Update’ discards ‘const’ qualifier from pointer target type
#  213|   
#  214|   	_saslauthd_MD5Init(&md5_context);
#  215|-> 	_saslauthd_MD5Update(&md5_context, password, strlen(password));
#  216|   	_saslauthd_MD5Final(pwd_digest, &md5_context);
#  217|   

Error: COMPILER_WARNING (CWE-563): [#def153]
cyrus-sasl-2.1.28/saslauthd/krbtf.c: scope_hint: In function ‘krbtf_name’
cyrus-sasl-2.1.28/saslauthd/krbtf.c:153:9: warning[-Wunused-parameter]: unused parameter ‘tfname’
#  153 |   char *tfname,                         /* O: where caller wants name */
#      |   ~~~~~~^~~~~~
#  151|   krbtf_name (
#  152|     /* PARAMETERS */
#  153|->   char *tfname,				/* O: where caller wants name */
#  154|     int len				/* I: available length */
#  155|     /* END PARAMETERS */

Error: COMPILER_WARNING (CWE-563): [#def154]
cyrus-sasl-2.1.28/saslauthd/krbtf.c:154:7: warning[-Wunused-parameter]: unused parameter ‘len’
#  154 |   int len                               /* I: available length */
#      |   ~~~~^~~
#  152|     /* PARAMETERS */
#  153|     char *tfname,				/* O: where caller wants name */
#  154|->   int len				/* I: available length */
#  155|     /* END PARAMETERS */
#  156|     )

Error: GCC_ANALYZER_WARNING (CWE-401): [#def155]
cyrus-sasl-2.1.28/saslauthd/lak.c:600:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
cyrus-sasl-2.1.28/saslauthd/lak.c:1492:12: enter_function: entry to ‘lak_auth_fastbind’
cyrus-sasl-2.1.28/saslauthd/lak.c:1506:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1514:40: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1514:22: call_function: calling ‘lak_expand_tokens’ from ‘lak_auth_fastbind’
#  598|   
#  599|   		if ((temp+1) >= end) {
#  600|-> 			syslog(LOG_DEBUG|LOG_AUTH, "Incomplete lookup substitution format");
#  601|   			break;
#  602|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def156]
cyrus-sasl-2.1.28/saslauthd/lak.c:616:41: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
cyrus-sasl-2.1.28/saslauthd/lak.c:1492:12: enter_function: entry to ‘lak_auth_fastbind’
cyrus-sasl-2.1.28/saslauthd/lak.c:1506:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1514:40: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1514:22: call_function: calling ‘lak_expand_tokens’ from ‘lak_auth_fastbind’
#  614|   					}
#  615|   				} else
#  616|-> 					syslog(LOG_DEBUG|LOG_AUTH, "Username not available.");
#  617|   				break;
#  618|   			case 'U':

Error: GCC_ANALYZER_WARNING (CWE-401): [#def157]
cyrus-sasl-2.1.28/saslauthd/lak.c:627:41: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
cyrus-sasl-2.1.28/saslauthd/lak.c:1492:12: enter_function: entry to ‘lak_auth_fastbind’
cyrus-sasl-2.1.28/saslauthd/lak.c:1506:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1514:40: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1514:22: call_function: calling ‘lak_expand_tokens’ from ‘lak_auth_fastbind’
#  625|   					}
#  626|   				} else
#  627|-> 					syslog(LOG_DEBUG|LOG_AUTH, "Username not available.");
#  628|   				break;
#  629|   			case '1':

Error: GCC_ANALYZER_WARNING (CWE-401): [#def158]
cyrus-sasl-2.1.28/saslauthd/lak.c:652:41: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
cyrus-sasl-2.1.28/saslauthd/lak.c:1492:12: enter_function: entry to ‘lak_auth_fastbind’
cyrus-sasl-2.1.28/saslauthd/lak.c:1506:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1514:40: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1514:22: call_function: calling ‘lak_expand_tokens’ from ‘lak_auth_fastbind’
#  650|   					}
#  651|   				} else
#  652|-> 					syslog(LOG_DEBUG|LOG_AUTH, "Domain/Realm not available.");
#  653|   				break;
#  654|   			case 'd':

Error: GCC_ANALYZER_WARNING (CWE-401): [#def159]
cyrus-sasl-2.1.28/saslauthd/lak.c:663:41: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
cyrus-sasl-2.1.28/saslauthd/lak.c:1492:12: enter_function: entry to ‘lak_auth_fastbind’
cyrus-sasl-2.1.28/saslauthd/lak.c:1506:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1514:40: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1514:22: call_function: calling ‘lak_expand_tokens’ from ‘lak_auth_fastbind’
#  661|   					}
#  662|   				} else
#  663|-> 					syslog(LOG_DEBUG|LOG_AUTH, "Domain/Realm not available.");
#  664|                                   break;
#  665|   			case 'R':

Error: GCC_ANALYZER_WARNING (CWE-401): [#def160]
cyrus-sasl-2.1.28/saslauthd/lak.c:676:41: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
cyrus-sasl-2.1.28/saslauthd/lak.c:1492:12: enter_function: entry to ‘lak_auth_fastbind’
cyrus-sasl-2.1.28/saslauthd/lak.c:1506:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1514:40: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1514:22: call_function: calling ‘lak_expand_tokens’ from ‘lak_auth_fastbind’
#  674|   					}
#  675|   				} else
#  676|-> 					syslog(LOG_DEBUG|LOG_AUTH, "Domain/Realm not available.");
#  677|   				break;
#  678|   			case 's':

Error: GCC_ANALYZER_WARNING (CWE-401): [#def161]
cyrus-sasl-2.1.28/saslauthd/lak.c:686:41: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
cyrus-sasl-2.1.28/saslauthd/lak.c:1492:12: enter_function: entry to ‘lak_auth_fastbind’
cyrus-sasl-2.1.28/saslauthd/lak.c:1506:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1514:40: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1514:22: call_function: calling ‘lak_expand_tokens’ from ‘lak_auth_fastbind’
#  684|   					}
#  685|   				} else
#  686|-> 					syslog(LOG_DEBUG|LOG_AUTH, "Service not available.");
#  687|   				break;
#  688|   			case 'D':

Error: GCC_ANALYZER_WARNING (CWE-401): [#def162]
cyrus-sasl-2.1.28/saslauthd/lak.c:696:41: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
cyrus-sasl-2.1.28/saslauthd/lak.c:1492:12: enter_function: entry to ‘lak_auth_fastbind’
cyrus-sasl-2.1.28/saslauthd/lak.c:1506:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1514:40: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1514:22: call_function: calling ‘lak_expand_tokens’ from ‘lak_auth_fastbind’
#  694|   					}
#  695|   				} else
#  696|-> 					syslog(LOG_DEBUG|LOG_AUTH, "User DN not available.");
#  697|   				break;
#  698|   			default:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def163]
cyrus-sasl-2.1.28/saslauthd/lak.c:774:22: warning[-Wanalyzer-malloc-leak]: leak of ‘lu’
cyrus-sasl-2.1.28/saslauthd/lak.c:1492:12: enter_function: entry to ‘lak_auth_fastbind’
cyrus-sasl-2.1.28/saslauthd/lak.c:1506:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1507:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1508:20: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1525:17: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1520:14: call_function: calling ‘lak_user’ from ‘lak_auth_fastbind’
cyrus-sasl-2.1.28/saslauthd/lak.c:1520:14: return_function: returning to ‘lak_auth_fastbind’ from ‘lak_user’
cyrus-sasl-2.1.28/saslauthd/lak.c:1528:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1531:14: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1531:14: call_function: calling ‘lak_bind’ from ‘lak_auth_fastbind’
#  772|   
#  773|   	if (ISSET(lak->conf->tls_cacert_file)) {
#  774|-> 		rc = ldap_set_option (NULL, LDAP_OPT_X_TLS_CACERTFILE, lak->conf->tls_cacert_file);
#  775|   		if (rc != LDAP_SUCCESS) {
#  776|   			syslog (LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_X_TLS_CACERTFILE (%s).", ldap_err2string (rc));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def164]
cyrus-sasl-2.1.28/saslauthd/lak.c:776:25: warning[-Wanalyzer-malloc-leak]: leak of ‘lu’
cyrus-sasl-2.1.28/saslauthd/lak.c:1492:12: enter_function: entry to ‘lak_auth_fastbind’
cyrus-sasl-2.1.28/saslauthd/lak.c:1506:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1507:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1508:20: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1525:17: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1520:14: call_function: calling ‘lak_user’ from ‘lak_auth_fastbind’
cyrus-sasl-2.1.28/saslauthd/lak.c:1520:14: return_function: returning to ‘lak_auth_fastbind’ from ‘lak_user’
cyrus-sasl-2.1.28/saslauthd/lak.c:1528:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1531:14: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1531:14: call_function: calling ‘lak_bind’ from ‘lak_auth_fastbind’
#  774|   		rc = ldap_set_option (NULL, LDAP_OPT_X_TLS_CACERTFILE, lak->conf->tls_cacert_file);
#  775|   		if (rc != LDAP_SUCCESS) {
#  776|-> 			syslog (LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_X_TLS_CACERTFILE (%s).", ldap_err2string (rc));
#  777|   		}
#  778|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def165]
cyrus-sasl-2.1.28/saslauthd/lak.c:781:22: warning[-Wanalyzer-malloc-leak]: leak of ‘lu’
cyrus-sasl-2.1.28/saslauthd/lak.c:1492:12: enter_function: entry to ‘lak_auth_fastbind’
cyrus-sasl-2.1.28/saslauthd/lak.c:1506:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1507:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1508:20: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1525:17: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1520:14: call_function: calling ‘lak_user’ from ‘lak_auth_fastbind’
cyrus-sasl-2.1.28/saslauthd/lak.c:1520:14: return_function: returning to ‘lak_auth_fastbind’ from ‘lak_user’
cyrus-sasl-2.1.28/saslauthd/lak.c:1528:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1531:14: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1531:14: call_function: calling ‘lak_bind’ from ‘lak_auth_fastbind’
#  779|   
#  780|   	if (ISSET(lak->conf->tls_cacert_dir)) {
#  781|-> 		rc = ldap_set_option (NULL, LDAP_OPT_X_TLS_CACERTDIR, lak->conf->tls_cacert_dir);
#  782|   		if (rc != LDAP_SUCCESS) {
#  783|   			syslog (LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_X_TLS_CACERTDIR (%s).", ldap_err2string (rc));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def166]
cyrus-sasl-2.1.28/saslauthd/lak.c:783:25: warning[-Wanalyzer-malloc-leak]: leak of ‘lu’
cyrus-sasl-2.1.28/saslauthd/lak.c:1492:12: enter_function: entry to ‘lak_auth_fastbind’
cyrus-sasl-2.1.28/saslauthd/lak.c:1506:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1507:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1508:20: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1525:17: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1520:14: call_function: calling ‘lak_user’ from ‘lak_auth_fastbind’
cyrus-sasl-2.1.28/saslauthd/lak.c:1520:14: return_function: returning to ‘lak_auth_fastbind’ from ‘lak_user’
cyrus-sasl-2.1.28/saslauthd/lak.c:1528:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1531:14: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1531:14: call_function: calling ‘lak_bind’ from ‘lak_auth_fastbind’
#  781|   		rc = ldap_set_option (NULL, LDAP_OPT_X_TLS_CACERTDIR, lak->conf->tls_cacert_dir);
#  782|   		if (rc != LDAP_SUCCESS) {
#  783|-> 			syslog (LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_X_TLS_CACERTDIR (%s).", ldap_err2string (rc));
#  784|   		}
#  785|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def167]
cyrus-sasl-2.1.28/saslauthd/lak.c:1130:17: warning[-Wanalyzer-malloc-leak]: leak of ‘lu’
cyrus-sasl-2.1.28/saslauthd/lak.c:1492:12: enter_function: entry to ‘lak_auth_fastbind’
cyrus-sasl-2.1.28/saslauthd/lak.c:1506:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1507:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1508:20: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1525:17: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1520:14: call_function: calling ‘lak_user’ from ‘lak_auth_fastbind’
cyrus-sasl-2.1.28/saslauthd/lak.c:1520:14: return_function: returning to ‘lak_auth_fastbind’ from ‘lak_user’
cyrus-sasl-2.1.28/saslauthd/lak.c:1528:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1531:14: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1531:14: call_function: calling ‘lak_bind’ from ‘lak_auth_fastbind’
# 1128|   
# 1129|   	if (lak->ld)
# 1130|-> 		ldap_unbind(lak->ld);
# 1131|   
# 1132|   	lak->ld = NULL;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def168]
cyrus-sasl-2.1.28/saslauthd/lak.c:1702:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*lres.value’
cyrus-sasl-2.1.28/saslauthd/lak.c:1652:12: enter_function: entry to ‘lak_result_add’
cyrus-sasl-2.1.28/saslauthd/lak.c:1660:12: branch_false: following ‘false’ branch (when ‘lres’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/lak.c:1664:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1667:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1668:17: call_function: inlined call to ‘lak_result_free’ from ‘lak_result_add’
# 1700|   		}
# 1701|   
# 1702|-> 		if (lres->value != NULL) {
# 1703|   			memset(lres->value, 0, strlen(lres->value));
# 1704|   			free(lres->value);	

Error: GCC_ANALYZER_WARNING (CWE-401): [#def169]
cyrus-sasl-2.1.28/saslauthd/lak.c:1764:9: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
cyrus-sasl-2.1.28/saslauthd/lak.c:1755:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1758:33: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1758:24: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/lak.c:1759:12: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/lak.c:1764:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1764:9: danger: ‘text’ leaks here; was allocated at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2)
# 1762|   	}
# 1763|   
# 1764|-> 	EVP_DecodeInit(enc_ctx);
# 1765|   	rc = EVP_DecodeUpdate(enc_ctx, (unsigned char *) text, &i, (const unsigned char *)src, strlen(src));
# 1766|   	if (rc < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def170]
cyrus-sasl-2.1.28/saslauthd/lak.c:1765:14: warning[-Wanalyzer-malloc-leak]: leak of ‘text’
cyrus-sasl-2.1.28/saslauthd/lak.c:1755:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/lak.c:1758:33: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1758:24: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/lak.c:1759:12: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/lak.c:1764:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/lak.c:1765:14: danger: ‘text’ leaks here; was allocated at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
# 1763|   
# 1764|   	EVP_DecodeInit(enc_ctx);
# 1765|-> 	rc = EVP_DecodeUpdate(enc_ctx, (unsigned char *) text, &i, (const unsigned char *)src, strlen(src));
# 1766|   	if (rc < 0) {
# 1767|   		EVP_ENCODE_CTX_free(enc_ctx);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def171]
cyrus-sasl-2.1.28/saslauthd/md5.c:189:10: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘x[1]’
cyrus-sasl-2.1.28/saslauthd/md5.c:433:6: enter_function: entry to ‘_saslauthd_hmac_md5’
cyrus-sasl-2.1.28/saslauthd/md5.c:451:6: branch_true: following ‘true’ branch (when ‘key_len > 64’)...
cyrus-sasl-2.1.28/saslauthd/md5.c:455:5: call_function: inlined call to ‘_saslauthd_MD5Init’ from ‘_saslauthd_hmac_md5’
cyrus-sasl-2.1.28/saslauthd/md5.c:456:5: call_function: calling ‘_saslauthd_MD5Update’ from ‘_saslauthd_hmac_md5’
cyrus-sasl-2.1.28/saslauthd/md5.c:456:5: return_function: returning to ‘_saslauthd_hmac_md5’ from ‘_saslauthd_MD5Update’
cyrus-sasl-2.1.28/saslauthd/md5.c:457:5: call_function: calling ‘_saslauthd_MD5Final’ from ‘_saslauthd_hmac_md5’
#  187|            /* Round 1 */
#  188|            FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
#  189|->          FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
#  190|            FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
#  191|            FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */

Error: COMPILER_WARNING (CWE-704): [#def172]
cyrus-sasl-2.1.28/saslauthd/md5.c: scope_hint: In function ‘_saslauthd_hmac_md5_init’
cyrus-sasl-2.1.28/saslauthd/md5.c:362:23: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘MD5_memcpy’ discards ‘const’ qualifier from pointer target type
#  362 |   MD5_memcpy( k_ipad, key, key_len);
#      |                       ^~~
cyrus-sasl-2.1.28/saslauthd/md5.c:304:49: note: expected ‘POINTER’ {aka ‘unsigned char *’} but argument is of type ‘const unsigned char *’
#  304 | static void MD5_memcpy (POINTER output, POINTER input, unsigned int len)
#      |                                         ~~~~~~~~^~~~~
#  360|     MD5_memset(k_ipad, '\0', sizeof k_ipad);
#  361|     MD5_memset(k_opad, '\0', sizeof k_opad);
#  362|->   MD5_memcpy( k_ipad, key, key_len);
#  363|     MD5_memcpy( k_opad, key, key_len);
#  364|   

Error: COMPILER_WARNING (CWE-704): [#def173]
cyrus-sasl-2.1.28/saslauthd/md5.c:362:23: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘MD5_memcpy’ discards ‘const’ qualifier from pointer target type
#  360|     MD5_memset(k_ipad, '\0', sizeof k_ipad);
#  361|     MD5_memset(k_opad, '\0', sizeof k_opad);
#  362|->   MD5_memcpy( k_ipad, key, key_len);
#  363|     MD5_memcpy( k_opad, key, key_len);
#  364|   

Error: COMPILER_WARNING (CWE-704): [#def174]
cyrus-sasl-2.1.28/saslauthd/md5.c:363:23: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘MD5_memcpy’ discards ‘const’ qualifier from pointer target type
#  363 |   MD5_memcpy( k_opad, key, key_len);
#      |                       ^~~
cyrus-sasl-2.1.28/saslauthd/md5.c:304:49: note: expected ‘POINTER’ {aka ‘unsigned char *’} but argument is of type ‘const unsigned char *’
#  304 | static void MD5_memcpy (POINTER output, POINTER input, unsigned int len)
#      |                                         ~~~~~~~~^~~~~
#  361|     MD5_memset(k_opad, '\0', sizeof k_opad);
#  362|     MD5_memcpy( k_ipad, key, key_len);
#  363|->   MD5_memcpy( k_opad, key, key_len);
#  364|   
#  365|     /* XOR key with ipad and opad values */

Error: COMPILER_WARNING (CWE-704): [#def175]
cyrus-sasl-2.1.28/saslauthd/md5.c:363:23: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘MD5_memcpy’ discards ‘const’ qualifier from pointer target type
#  361|     MD5_memset(k_opad, '\0', sizeof k_opad);
#  362|     MD5_memcpy( k_ipad, key, key_len);
#  363|->   MD5_memcpy( k_opad, key, key_len);
#  364|   
#  365|     /* XOR key with ipad and opad values */

Error: COMPILER_WARNING: [#def176]
cyrus-sasl-2.1.28/saslauthd/md5.c: scope_hint: In function ‘_saslauthd_hmac_md5’
cyrus-sasl-2.1.28/saslauthd/md5.c:433:6: warning[-Wold-style-definition]: old-style function definition
#  433 | void _saslauthd_hmac_md5(text, text_len, key, key_len, digest)
#      |      ^~~~~~~~~~~~~~~~~~~
#  431|   
#  432|   
#  433|-> void _saslauthd_hmac_md5(text, text_len, key, key_len, digest)
#  434|   const unsigned char* text; /* pointer to data stream */
#  435|   int text_len; /* length of data stream */

Error: COMPILER_WARNING: [#def177]
cyrus-sasl-2.1.28/saslauthd/md5.c:433:6: warning[-Wold-style-definition]: old-style function definition
#  431|   
#  432|   
#  433|-> void _saslauthd_hmac_md5(text, text_len, key, key_len, digest)
#  434|   const unsigned char* text; /* pointer to data stream */
#  435|   int text_len; /* length of data stream */

Error: COMPILER_WARNING (CWE-704): [#def178]
cyrus-sasl-2.1.28/saslauthd/md5.c:456:33: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘_saslauthd_MD5Update’ discards ‘const’ qualifier from pointer target type
#  456 |     _saslauthd_MD5Update(&tctx, key, key_len);
#      |                                 ^~~
cyrus-sasl-2.1.28/saslauthd/md5.c:114:61: note: expected ‘unsigned char *’ but argument is of type ‘const unsigned char *’
#  114 | void _saslauthd_MD5Update (MD5_CTX *context, unsigned char *input, unsigned int inputLen)
#      |                                              ~~~~~~~~~~~~~~~^~~~~
#  454|   
#  455|       _saslauthd_MD5Init(&tctx); 
#  456|->     _saslauthd_MD5Update(&tctx, key, key_len); 
#  457|       _saslauthd_MD5Final(tk, &tctx); 
#  458|   

Error: COMPILER_WARNING (CWE-704): [#def179]
cyrus-sasl-2.1.28/saslauthd/md5.c:456:33: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘_saslauthd_MD5Update’ discards ‘const’ qualifier from pointer target type
#  454|   
#  455|       _saslauthd_MD5Init(&tctx); 
#  456|->     _saslauthd_MD5Update(&tctx, key, key_len); 
#  457|       _saslauthd_MD5Final(tk, &tctx); 
#  458|   

Error: COMPILER_WARNING (CWE-704): [#def180]
cyrus-sasl-2.1.28/saslauthd/md5.c:477:23: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘MD5_memcpy’ discards ‘const’ qualifier from pointer target type
#  477 |   MD5_memcpy( k_ipad, key, key_len);
#      |                       ^~~
cyrus-sasl-2.1.28/saslauthd/md5.c:304:49: note: expected ‘POINTER’ {aka ‘unsigned char *’} but argument is of type ‘const unsigned char *’
#  304 | static void MD5_memcpy (POINTER output, POINTER input, unsigned int len)
#      |                                         ~~~~~~~~^~~~~
#  475|     MD5_memset(k_ipad, '\0', sizeof k_ipad);
#  476|     MD5_memset(k_opad, '\0', sizeof k_opad);
#  477|->   MD5_memcpy( k_ipad, key, key_len);
#  478|     MD5_memcpy( k_opad, key, key_len);
#  479|   

Error: COMPILER_WARNING (CWE-704): [#def181]
cyrus-sasl-2.1.28/saslauthd/md5.c:477:23: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘MD5_memcpy’ discards ‘const’ qualifier from pointer target type
#  475|     MD5_memset(k_ipad, '\0', sizeof k_ipad);
#  476|     MD5_memset(k_opad, '\0', sizeof k_opad);
#  477|->   MD5_memcpy( k_ipad, key, key_len);
#  478|     MD5_memcpy( k_opad, key, key_len);
#  479|   

Error: COMPILER_WARNING (CWE-704): [#def182]
cyrus-sasl-2.1.28/saslauthd/md5.c:478:23: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘MD5_memcpy’ discards ‘const’ qualifier from pointer target type
#  478 |   MD5_memcpy( k_opad, key, key_len);
#      |                       ^~~
cyrus-sasl-2.1.28/saslauthd/md5.c:304:49: note: expected ‘POINTER’ {aka ‘unsigned char *’} but argument is of type ‘const unsigned char *’
#  304 | static void MD5_memcpy (POINTER output, POINTER input, unsigned int len)
#      |                                         ~~~~~~~~^~~~~
#  476|     MD5_memset(k_opad, '\0', sizeof k_opad);
#  477|     MD5_memcpy( k_ipad, key, key_len);
#  478|->   MD5_memcpy( k_opad, key, key_len);
#  479|   
#  480|     /* XOR key with ipad and opad values */

Error: COMPILER_WARNING (CWE-704): [#def183]
cyrus-sasl-2.1.28/saslauthd/md5.c:478:23: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘MD5_memcpy’ discards ‘const’ qualifier from pointer target type
#  476|     MD5_memset(k_opad, '\0', sizeof k_opad);
#  477|     MD5_memcpy( k_ipad, key, key_len);
#  478|->   MD5_memcpy( k_opad, key, key_len);
#  479|   
#  480|     /* XOR key with ipad and opad values */

Error: COMPILER_WARNING (CWE-704): [#def184]
cyrus-sasl-2.1.28/saslauthd/md5.c:492:34: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘_saslauthd_MD5Update’ discards ‘const’ qualifier from pointer target type
#  492 |   _saslauthd_MD5Update(&context, text, text_len); /* then text of datagram */
#      |                                  ^~~~
cyrus-sasl-2.1.28/saslauthd/md5.c:114:61: note: expected ‘unsigned char *’ but argument is of type ‘const unsigned char *’
#  114 | void _saslauthd_MD5Update (MD5_CTX *context, unsigned char *input, unsigned int inputLen)
#      |                                              ~~~~~~~~~~~~~~~^~~~~
#  490|   					       * pass */
#  491|     _saslauthd_MD5Update(&context, k_ipad, 64);      /* start with inner pad */
#  492|->   _saslauthd_MD5Update(&context, text, text_len); /* then text of datagram */
#  493|     _saslauthd_MD5Final(digest, &context);          /* finish up 1st pass */
#  494|   

Error: COMPILER_WARNING (CWE-704): [#def185]
cyrus-sasl-2.1.28/saslauthd/md5.c:492:34: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘_saslauthd_MD5Update’ discards ‘const’ qualifier from pointer target type
#  490|   					       * pass */
#  491|     _saslauthd_MD5Update(&context, k_ipad, 64);      /* start with inner pad */
#  492|->   _saslauthd_MD5Update(&context, text, text_len); /* then text of datagram */
#  493|     _saslauthd_MD5Final(digest, &context);          /* finish up 1st pass */
#  494|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def186]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:224:33: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:224:33: danger: ‘auth_mech_name’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  222|   
#  223|   			case 's':
#  224|-> 				cache_set_table_size(optarg);
#  225|   				break;
#  226|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def187]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:228:33: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:228:33: danger: ‘auth_mech_name’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  226|   
#  227|   			case 't':
#  228|-> 				cache_set_timeout(optarg);
#  229|   				break;
#  230|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def188]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:256:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:256:17: danger: ‘auth_mech_name’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  254|   	/* Create our working directory */
#  255|   	if (mkdir(run_path, 0755) == -1 && errno != EEXIST) {
#  256|-> 		logger(L_ERR, L_FUNC, "can not mkdir: %s", run_path);
#  257|   		logger(L_ERR, L_FUNC, "Check to make sure the parent directory exists and is");
#  258|   		logger(L_ERR, L_FUNC, "writeable by the user this process runs as.");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def189]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:257:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:257:17: danger: ‘auth_mech_name’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  255|   	if (mkdir(run_path, 0755) == -1 && errno != EEXIST) {
#  256|   		logger(L_ERR, L_FUNC, "can not mkdir: %s", run_path);
#  257|-> 		logger(L_ERR, L_FUNC, "Check to make sure the parent directory exists and is");
#  258|   		logger(L_ERR, L_FUNC, "writeable by the user this process runs as.");
#  259|   		exit(1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def190]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:258:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:258:17: danger: ‘auth_mech_name’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  256|   		logger(L_ERR, L_FUNC, "can not mkdir: %s", run_path);
#  257|   		logger(L_ERR, L_FUNC, "Check to make sure the parent directory exists and is");
#  258|-> 		logger(L_ERR, L_FUNC, "writeable by the user this process runs as.");
#  259|   		exit(1);
#  260|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def191]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:265:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:264:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:265:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:265:17: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/5)
#  263|   
#  264|   	if (flags & VERBOSE)  {
#  265|-> 		logger(L_DEBUG, L_FUNC, "num_procs  : %d", num_procs);
#  266|   
#  267|   		if (mech_option == NULL)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def192]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:268:25: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:264:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:265:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:267:20: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:268:25: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:268:25: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/5)
#  266|   
#  267|   		if (mech_option == NULL)
#  268|-> 			logger(L_DEBUG, L_FUNC, "mech_option: NULL");
#  269|   		else
#  270|   			logger(L_DEBUG, L_FUNC, "mech_option: %s", mech_option);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def193]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:270:25: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:264:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:265:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:267:20: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:270:25: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:270:25: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/5)
#  268|   			logger(L_DEBUG, L_FUNC, "mech_option: NULL");
#  269|   		else
#  270|-> 			logger(L_DEBUG, L_FUNC, "mech_option: %s", mech_option);
#  271|   
#  272|   		logger(L_DEBUG, L_FUNC, "run_path   : %s", run_path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def194]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:272:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:264:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:265:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:272:17: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/5)
#  270|   			logger(L_DEBUG, L_FUNC, "mech_option: %s", mech_option);
#  271|   
#  272|-> 		logger(L_DEBUG, L_FUNC, "run_path   : %s", run_path);
#  273|   		logger(L_DEBUG, L_FUNC, "auth_mech  : %s", auth_mech->name);
#  274|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def195]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:273:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:264:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:265:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:273:17: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/5)
#  271|   
#  272|   		logger(L_DEBUG, L_FUNC, "run_path   : %s", run_path);
#  273|-> 		logger(L_DEBUG, L_FUNC, "auth_mech  : %s", auth_mech->name);
#  274|   	}
#  275|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def196]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:283:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:282:22: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:283:17: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/5)
#  281|   	if (chdir(run_path) == -1) {
#  282|   		rc = errno;
#  283|-> 		logger(L_ERR, L_FUNC, "could not chdir to: %s", run_path);
#  284|   		logger(L_ERR, L_FUNC, "chdir: %s", strerror(rc));
#  285|   		logger(L_ERR, L_FUNC, "Check to make sure the directory exists and is");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def197]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:284:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:282:22: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:284:17: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/5)
#  282|   		rc = errno;
#  283|   		logger(L_ERR, L_FUNC, "could not chdir to: %s", run_path);
#  284|-> 		logger(L_ERR, L_FUNC, "chdir: %s", strerror(rc));
#  285|   		logger(L_ERR, L_FUNC, "Check to make sure the directory exists and is");
#  286|   		logger(L_ERR, L_FUNC, "writeable by the user this process runs as.");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def198]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:285:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:282:22: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:285:17: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/5)
#  283|   		logger(L_ERR, L_FUNC, "could not chdir to: %s", run_path);
#  284|   		logger(L_ERR, L_FUNC, "chdir: %s", strerror(rc));
#  285|-> 		logger(L_ERR, L_FUNC, "Check to make sure the directory exists and is");
#  286|   		logger(L_ERR, L_FUNC, "writeable by the user this process runs as.");
#  287|   		exit(1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def199]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:286:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:282:22: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:286:17: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/5)
#  284|   		logger(L_ERR, L_FUNC, "chdir: %s", strerror(rc));
#  285|   		logger(L_ERR, L_FUNC, "Check to make sure the directory exists and is");
#  286|-> 		logger(L_ERR, L_FUNC, "writeable by the user this process runs as.");
#  287|   		exit(1);
#  288|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def200]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:294:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:290:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:293:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:294:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:294:17: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/5)
#  292|   	pid_file_size = strlen(run_path) + sizeof(PID_FILE_LOCK) + 1;
#  293|   	if ((pid_file_lock = malloc(pid_file_size)) == NULL) {
#  294|-> 		logger(L_ERR, L_FUNC, "could not allocate memory");
#  295|   		exit(1);
#  296|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def201]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:301:33: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:290:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:293:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:298:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:301:33: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/5)
#  299|   	strlcat(pid_file_lock, PID_FILE_LOCK, pid_file_size);
#  300|   
#  301|-> 	if ((pid_file_lock_fd = open(pid_file_lock, O_CREAT|O_TRUNC|O_RDWR, 0644)) < 0) {
#  302|   		rc = errno;
#  303|   		logger(L_ERR, L_FUNC, "could not open pid lock file: %s", pid_file_lock);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def202]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:303:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:290:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:293:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:298:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:301:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:302:22: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:303:17: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/5)
#  301|   	if ((pid_file_lock_fd = open(pid_file_lock, O_CREAT|O_TRUNC|O_RDWR, 0644)) < 0) {
#  302|   		rc = errno;
#  303|-> 		logger(L_ERR, L_FUNC, "could not open pid lock file: %s", pid_file_lock);
#  304|   		logger(L_ERR, L_FUNC, "open: %s", strerror(rc));
#  305|   		logger(L_ERR, L_FUNC,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def203]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:304:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:290:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:293:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:298:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:301:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:302:22: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:304:17: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/5)
#  302|   		rc = errno;
#  303|   		logger(L_ERR, L_FUNC, "could not open pid lock file: %s", pid_file_lock);
#  304|-> 		logger(L_ERR, L_FUNC, "open: %s", strerror(rc));
#  305|   		logger(L_ERR, L_FUNC,
#  306|   		       "Check to make sure the directory exists and is");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def204]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:305:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:290:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:293:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:298:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:301:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:302:22: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:305:17: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/5)
#  303|   		logger(L_ERR, L_FUNC, "could not open pid lock file: %s", pid_file_lock);
#  304|   		logger(L_ERR, L_FUNC, "open: %s", strerror(rc));
#  305|-> 		logger(L_ERR, L_FUNC,
#  306|   		       "Check to make sure the directory exists and is");
#  307|   		logger(L_ERR, L_FUNC, "writeable by the user this process runs as.");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def205]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:307:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:290:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:293:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:298:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:301:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:302:22: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:307:17: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/5)
#  305|   		logger(L_ERR, L_FUNC,
#  306|   		       "Check to make sure the directory exists and is");
#  307|-> 		logger(L_ERR, L_FUNC, "writeable by the user this process runs as.");
#  308|   		exit(1);
#  309|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def206]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:316:13: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:290:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:293:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:298:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:301:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:311:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:316:13: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/5)
#  314|   	lockinfo.l_whence = SEEK_SET;
#  315|   
#  316|-> 	if (fcntl(pid_file_lock_fd, F_SETLK, &lockinfo) == -1) {
#  317|   		rc = errno;
#  318|   		logger(L_ERR, L_FUNC, "could not lock pid lock file: %s", pid_file_lock);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def207]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:318:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:290:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:293:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:298:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:301:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:311:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:316:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:317:22: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:318:17: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/5)
#  316|   	if (fcntl(pid_file_lock_fd, F_SETLK, &lockinfo) == -1) {
#  317|   		rc = errno;
#  318|-> 		logger(L_ERR, L_FUNC, "could not lock pid lock file: %s", pid_file_lock);
#  319|   		logger(L_ERR, L_FUNC, "fcntl: %s", strerror(rc));
#  320|   		exit(1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def208]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:319:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:290:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:293:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:298:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:301:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:311:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:316:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:317:22: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:319:17: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/5)
#  317|   		rc = errno;
#  318|   		logger(L_ERR, L_FUNC, "could not lock pid lock file: %s", pid_file_lock);
#  319|-> 		logger(L_ERR, L_FUNC, "fcntl: %s", strerror(rc));
#  320|   		exit(1);
#  321|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def209]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:324:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:290:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:293:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:298:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:301:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:311:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:316:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:12: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:11: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:324:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:324:17: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/5)
#  322|       
#  323|   	if(pipe(startup_pipe) == -1) {
#  324|-> 		logger(L_ERR, L_FUNC, "can't create startup pipe");
#  325|   		exit(1);
#  326|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def210]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:337:13: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:290:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:293:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:298:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:301:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:311:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:316:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:12: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:11: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:331:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:331:9: call_function: calling ‘signal_setup’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:331:9: return_function: returning to ‘main’ from ‘signal_setup’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:337:13: danger: ‘auth_mech_name’ leaks here; was allocated at [(6)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/5)
#  335|   	 * be to disable the cache and log a warning).
#  336|   	 **********************************************************/
#  337|-> 	if (cache_init() != 0)
#  338|   		exit(1);
#  339|   

Error: CPPCHECK_WARNING (CWE-476): [#def211]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:418: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: response
#  416|   	}
#  417|   
#  418|-> 	if (strncmp(response, "OK", 2) == 0) {
#  419|   		cache_commit(&lkup_result);
#  420|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def212]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:418:13: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘response’ where non-null expected
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:406:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:407:28: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:407:28: acquire_memory: this call could return NULL
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:418:13: danger: argument 1 (‘response’) from [(3)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#  416|   	}
#  417|   
#  418|-> 	if (strncmp(response, "OK", 2) == 0) {
#  419|   		cache_commit(&lkup_result);
#  420|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def213]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:419:17: warning[-Wanalyzer-malloc-leak]: leak of ‘response’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:406:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:407:28: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:407:28: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:418:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:419:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:419:17: danger: ‘response’ leaks here; was allocated at [(3)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/2)
#  417|   
#  418|   	if (strncmp(response, "OK", 2) == 0) {
#  419|-> 		cache_commit(&lkup_result);
#  420|   
#  421|   		if (flags & VERBOSE) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def214]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:423:33: warning[-Wanalyzer-malloc-leak]: leak of ‘response’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:406:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:407:28: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:407:28: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:418:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:419:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:421:20: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:422:28: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:422:28: branch_true: following ‘true’ branch (when ‘cached != 0’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:423:33: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:423:33: danger: ‘response’ leaks here; was allocated at [(3)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/2)
#  421|   		if (flags & VERBOSE) {
#  422|   			if (cached) 
#  423|-> 				logger(L_DEBUG, L_FUNC, "auth success (cached): [user=%s] [service=%s] [realm=%s]", \
#  424|   					login, service, realm);
#  425|   			else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def215]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:426:33: warning[-Wanalyzer-malloc-leak]: leak of ‘response’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:406:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:410:37: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:412:20: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:413:90: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:414:36: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:418:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:419:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:421:20: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:422:28: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:422:28: branch_false: following ‘false’ branch (when ‘cached == 0’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:427:73: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:426:33: danger: ‘response’ leaks here; was allocated at [(5)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/4)
#  424|   					login, service, realm);
#  425|   			else
#  426|-> 				logger(L_DEBUG, L_FUNC, "auth success: [user=%s] [service=%s] [realm=%s] [mech=%s]", \
#  427|   					login, service, realm, auth_mech->name);
#  428|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def216]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:433:17: warning[-Wanalyzer-malloc-leak]: leak of ‘response’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:406:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:407:28: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:407:28: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:418:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:432:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:432:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:435:25: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:433:17: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:434:57: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:433:17: danger: ‘response’ leaks here; was allocated at [(3)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/2)
#  431|   
#  432|   	if (strncmp(response, "NO", 2) == 0) {
#  433|-> 		logger(L_INFO, L_FUNC, "auth failure: [user=%s] [service=%s] [realm=%s] [mech=%s] [reason=%s]", \
#  434|   			login, service, realm, auth_mech->name,
#  435|   		        strlen(response) >= 4 ? response+3 : "Unknown");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def217]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:440:9: warning[-Wanalyzer-malloc-leak]: leak of ‘response’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:406:12: branch_true: following ‘true’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:407:28: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:407:28: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:418:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:432:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:432:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:440:83: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:440:9: danger: ‘response’ leaks here; was allocated at [(3)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/2)
#  438|   	}
#  439|   
#  440|-> 	logger(L_ERR, L_FUNC, "mechanism returned unknown response: %s", auth_mech->name);
#  441|   	free(response);
#  442|   	response = strdup("NO internal mechanism failure");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def218]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:458:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
#  456|   
#  457|   	if (auth_mech->name == NULL) {
#  458|-> 		logger(L_ERR, L_FUNC, "unknown authentication mechanism: %s", mech);
#  459|   		exit(1);
#  460|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def219]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:463:20: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
#  461|   
#  462|   	if (auth_mech->initialize) {
#  463|-> 		if(auth_mech->initialize() != 0) {
#  464|   		    logger(L_ERR, L_FUNC, "failed to initialize mechanism %s",
#  465|   			   auth_mech->name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def220]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:464:21: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
#  462|   	if (auth_mech->initialize) {
#  463|   		if(auth_mech->initialize() != 0) {
#  464|-> 		    logger(L_ERR, L_FUNC, "failed to initialize mechanism %s",
#  465|   			   auth_mech->name);
#  466|   		    exit(1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def221]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:480:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:216:33: call_function: calling ‘set_max_procs’ from ‘main’
#  478|   
#  479|   	if(num_procs < 0) {
#  480|-> 		logger(L_ERR, L_FUNC, "invalid number of worker processes defined");
#  481|   		exit(1);
#  482|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def222]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:497:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:204:33: call_function: calling ‘set_mech_option’ from ‘main’
#  495|   
#  496|   	if ((mech_option = strdup(option)) == NULL) {
#  497|-> 		logger(L_ERR, L_FUNC, "could not allocate memory");
#  498|   		exit(1);
#  499|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def223]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:511:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:212:33: call_function: calling ‘set_run_path’ from ‘main’
#  509|   
#  510|   	if (*path != '/') {
#  511|-> 		logger(L_ERR, L_FUNC, "-m requires an absolute pathname");
#  512|   		exit(1);
#  513|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def224]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:519:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:212:33: call_function: calling ‘set_run_path’ from ‘main’
#  517|   
#  518|   	if ((run_path = strdup(path)) == NULL) {
#  519|-> 		logger(L_ERR, L_FUNC, "could not allocate memory");
#  520|   		exit(1);
#  521|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def225]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:549:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:290:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:293:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:298:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:301:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:311:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:316:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:12: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:11: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:331:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:331:9: call_function: calling ‘signal_setup’ from ‘main’
#  547|   	if (sigaction(SIGCHLD, &act_sigchld, NULL) != 0) {
#  548|   		rc = errno;
#  549|-> 		logger(L_ERR, L_FUNC, "failed to set sigaction for SIGCHLD");
#  550|   		logger(L_ERR, L_FUNC, "sigaction: %s", strerror(rc));
#  551|   		exit(1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def226]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:550:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:290:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:293:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:298:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:301:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:311:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:316:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:12: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:11: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:331:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:331:9: call_function: calling ‘signal_setup’ from ‘main’
#  548|   		rc = errno;
#  549|   		logger(L_ERR, L_FUNC, "failed to set sigaction for SIGCHLD");
#  550|-> 		logger(L_ERR, L_FUNC, "sigaction: %s", strerror(rc));
#  551|   		exit(1);
#  552|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def227]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:562:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:290:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:293:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:298:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:301:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:311:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:316:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:12: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:11: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:331:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:331:9: call_function: calling ‘signal_setup’ from ‘main’
#  560|   	if (sigaction(SIGALRM, &act_sigalrm, NULL) != 0) {
#  561|   		rc = errno;
#  562|-> 		logger(L_ERR, L_FUNC, "failed to set sigaction for SIGALRM");
#  563|   		logger(L_ERR, L_FUNC, "sigaction: %s", strerror(rc));
#  564|   		exit(1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def228]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:563:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:290:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:293:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:298:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:301:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:311:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:316:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:12: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:11: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:331:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:331:9: call_function: calling ‘signal_setup’ from ‘main’
#  561|   		rc = errno;
#  562|   		logger(L_ERR, L_FUNC, "failed to set sigaction for SIGALRM");
#  563|-> 		logger(L_ERR, L_FUNC, "sigaction: %s", strerror(rc));
#  564|   		exit(1);
#  565|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def229]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:575:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:290:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:293:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:298:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:301:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:311:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:316:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:12: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:11: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:331:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:331:9: call_function: calling ‘signal_setup’ from ‘main’
#  573|   	if (sigaction(SIGPIPE, &act_sigpipe, NULL) != 0) {
#  574|   		rc = errno;
#  575|-> 		logger(L_ERR, L_FUNC, "failed to set sigaction for SIGPIPE");
#  576|   		logger(L_ERR, L_FUNC, "sigaction: %s", strerror(rc));
#  577|   		exit(1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def230]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:576:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:290:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:293:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:298:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:301:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:311:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:316:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:12: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:11: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:331:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:331:9: call_function: calling ‘signal_setup’ from ‘main’
#  574|   		rc = errno;
#  575|   		logger(L_ERR, L_FUNC, "failed to set sigaction for SIGPIPE");
#  576|-> 		logger(L_ERR, L_FUNC, "sigaction: %s", strerror(rc));
#  577|   		exit(1);
#  578|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def231]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:588:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:290:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:293:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:298:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:301:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:311:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:316:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:12: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:11: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:331:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:331:9: call_function: calling ‘signal_setup’ from ‘main’
#  586|   	if (sigaction(SIGHUP, &act_sighup, NULL) != 0) {
#  587|   		rc = errno;
#  588|-> 		logger(L_ERR, L_FUNC, "failed to set sigaction for SIGHUP");
#  589|   		logger(L_ERR, L_FUNC, "sigaction: %s", strerror(rc));
#  590|   		exit(1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def232]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:589:17: warning[-Wanalyzer-malloc-leak]: leak of ‘auth_mech_name’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:150:5: enter_function: entry to ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_true: following ‘true’ branch (when ‘option != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:174:17: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:177:35: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:182:50: acquire_memory: allocated here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:183:36: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
 branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:173:16: branch_false: following ‘false’ branch (when ‘option == -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:245:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:248:12: branch_false: following ‘false’ branch (when ‘auth_mech_name’ is non-NULL)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:255:13: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: call_function: calling ‘set_auth_mech’ from ‘main’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:262:9: return_function: returning to ‘main’ from ‘set_auth_mech’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:281:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:290:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:293:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:298:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:301:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:311:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:316:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:12: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:323:11: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:331:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:331:9: call_function: calling ‘signal_setup’ from ‘main’
#  587|   		rc = errno;
#  588|   		logger(L_ERR, L_FUNC, "failed to set sigaction for SIGHUP");
#  589|-> 		logger(L_ERR, L_FUNC, "sigaction: %s", strerror(rc));
#  590|   		exit(1);
#  591|   	}

Error: COMPILER_WARNING (CWE-252): [#def233]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c: scope_hint: In function ‘detach_tty’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:701:13: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  701 |             write(startup_pipe[1], &exit_result, sizeof(exit_result));
#      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  699|   	    
#  700|   	    /* Tell our parent that we failed. */
#  701|-> 	    write(startup_pipe[1], &exit_result, sizeof(exit_result));
#  702|   	    
#  703|   	    exit(1);

Error: COMPILER_WARNING (CWE-252): [#def234]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:714:13: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  714 |             write(startup_pipe[1], &exit_result, sizeof(exit_result));
#      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  712|   	    
#  713|   	    /* Tell our parent that we failed. */
#  714|-> 	    write(startup_pipe[1], &exit_result, sizeof(exit_result));
#  715|   	    
#  716|   	    exit(1);

Error: GCC_ANALYZER_WARNING: [#def235]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:728:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘0’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:641:8: branch_true: following ‘true’ branch...
 branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:642:18: branch_true: following ‘true’ branch (when ‘x != 0’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:643:19: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:655:12: branch_false: following ‘false’ branch (when ‘pid != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:662:19: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:662:19: branch_false: following ‘false’ branch (when ‘pid == 0’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:689:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:693:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:706:24: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:706:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:722:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:724:9: release_resource: closed here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:728:9: danger: ‘0’ could be invalid
#  726|   	close(STDERR_FILENO);
#  727|   	
#  728|-> 	dup2(null_fd, STDIN_FILENO);
#  729|   	dup2(null_fd, STDOUT_FILENO);
#  730|   	dup2(null_fd, STDERR_FILENO);

Error: GCC_ANALYZER_WARNING: [#def236]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:729:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘1’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:641:8: branch_true: following ‘true’ branch...
 branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:642:18: branch_true: following ‘true’ branch (when ‘x != 0’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:643:19: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:655:12: branch_false: following ‘false’ branch (when ‘pid != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:662:19: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:662:19: branch_false: following ‘false’ branch (when ‘pid == 0’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:689:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:693:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:706:24: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:706:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:722:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:725:9: release_resource: closed here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:729:9: danger: ‘1’ could be invalid
#  727|   	
#  728|   	dup2(null_fd, STDIN_FILENO);
#  729|-> 	dup2(null_fd, STDOUT_FILENO);
#  730|   	dup2(null_fd, STDERR_FILENO);
#  731|   

Error: GCC_ANALYZER_WARNING: [#def237]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:730:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘2’
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:641:8: branch_true: following ‘true’ branch...
 branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:642:18: branch_true: following ‘true’ branch (when ‘x != 0’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:643:19: branch_true: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:655:12: branch_false: following ‘false’ branch (when ‘pid != -1’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:662:19: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:662:19: branch_false: following ‘false’ branch (when ‘pid == 0’)...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:689:9: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:693:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:706:24: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:706:12: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:722:15: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:726:9: release_resource: closed here
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:730:9: danger: ‘2’ could be invalid
#  728|   	dup2(null_fd, STDIN_FILENO);
#  729|   	dup2(null_fd, STDOUT_FILENO);
#  730|-> 	dup2(null_fd, STDERR_FILENO);
#  731|   
#  732|   	if (null_fd > 2)

Error: COMPILER_WARNING (CWE-252): [#def238]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:742:13: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  742 |             write(startup_pipe[1], &exit_result, sizeof(exit_result));
#      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  740|   	    exit_result = 1;
#  741|   	    logger(L_ERR, L_FUNC, "could not allocate memory");
#  742|-> 	    write(startup_pipe[1], &exit_result, sizeof(exit_result));
#  743|   	    exit(1);
#  744|   	}

Error: COMPILER_WARNING (CWE-252): [#def239]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:759:13: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  759 |             write(startup_pipe[1], &exit_result, sizeof(exit_result));
#      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  757|   	    
#  758|   	    /* Tell our parent that we failed. */
#  759|-> 	    write(startup_pipe[1], &exit_result, sizeof(exit_result));
#  760|   	    
#  761|   	    exit(1);

Error: COMPILER_WARNING (CWE-252): [#def240]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:778:17: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  778 |                 write(startup_pipe[1], &exit_result, sizeof(exit_result));
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  776|   		
#  777|   		/* Tell our parent that we failed. */
#  778|-> 		write(startup_pipe[1], &exit_result, sizeof(exit_result));
#  779|   		
#  780|   		exit(2);

Error: COMPILER_WARNING (CWE-252): [#def241]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:795:21: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  795 |                     write(startup_pipe[1], &exit_result, sizeof(exit_result));
#      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  793|   		    
#  794|   		    /* Tell our parent that we failed. */
#  795|-> 		    write(startup_pipe[1], &exit_result, sizeof(exit_result));
#  796|   		    
#  797|   		    exit(1);

Error: COMPILER_WARNING (CWE-252): [#def242]
cyrus-sasl-2.1.28/saslauthd/saslauthd-main.c:812:21: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  812 |                     write(startup_pipe[1], &exit_result, sizeof(exit_result));
#      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  810|   		    
#  811|   		    /* Tell our parent that we failed. */
#  812|-> 		    write(startup_pipe[1], &exit_result, sizeof(exit_result));
#  813|   		    
#  814|   		    exit(1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def243]
cyrus-sasl-2.1.28/saslauthd/testsaslauthd.c:192:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘s’
cyrus-sasl-2.1.28/saslauthd/testsaslauthd.c:116:7: branch_false: following ‘false’ branch...
cyrus-sasl-2.1.28/saslauthd/testsaslauthd.c:118:8: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/testsaslauthd.c:182:9: acquire_resource: stream socket created here
cyrus-sasl-2.1.28/saslauthd/testsaslauthd.c:183:8: branch_false: following ‘false’ branch (when ‘s != -1’)...
cyrus-sasl-2.1.28/saslauthd/testsaslauthd.c:188:5: branch_false: ...to here
cyrus-sasl-2.1.28/saslauthd/testsaslauthd.c:192:9: danger: ‘s’ leaks here
#  190|       strlcpy(srvaddr.sun_path, pwpath, sizeof(srvaddr.sun_path));
#  191|   
#  192|->     r = connect(s, (struct sockaddr *) &srvaddr, sizeof(srvaddr));
#  193|       if (r == -1) {
#  194|           close(s);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def244]
cyrus-sasl-2.1.28/tests/t_gssapi_cli.c:33:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
cyrus-sasl-2.1.28/tests/t_gssapi_cli.c:26:12: acquire_resource: stream socket created here
cyrus-sasl-2.1.28/tests/t_gssapi_cli.c:27:8: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
cyrus-sasl-2.1.28/tests/t_gssapi_cli.c:29:5: branch_false: ...to here
cyrus-sasl-2.1.28/tests/t_gssapi_cli.c:33:11: danger: ‘sock’ leaks here
#   31|       addr.sin_port = htons(9000);
#   32|   
#   33|->     ret = connect(sock, (struct sockaddr *)&addr, sizeof(addr));
#   34|       if (ret != 0) s_error("connect", 0, 0, errno);
#   35|   

Error: CPPCHECK_WARNING (CWE-401): [#def245]
cyrus-sasl-2.1.28/tests/t_gssapi_cli.c:77: error[memleakOnRealloc]: Common realloc mistake: 'x' nulled but not freed upon failure
#   75|       len = strlen(testpass);
#   76|   
#   77|->     x = (sasl_secret_t *) realloc(x, sizeof(sasl_secret_t) + len);
#   78|   
#   79|       if (!x) {

Error: COMPILER_WARNING (CWE-843): [#def246]
cyrus-sasl-2.1.28/tests/t_gssapi_cli.c: scope_hint: In function ‘main’
cyrus-sasl-2.1.28/tests/t_gssapi_cli.c:129:25: warning[-Wcast-function-type]: cast between incompatible function types from ‘int (*)(void *, const char **)’ to ‘int (*)(void)’
#  129 |     callbacks[0].proc = (sasl_callback_ft)&getpath;
#      |                         ^
#  127|       /* initialize the sasl library */
#  128|       callbacks[0].id = SASL_CB_GETPATH;
#  129|->     callbacks[0].proc = (sasl_callback_ft)&getpath;
#  130|       callbacks[0].context = NULL;
#  131|       callbacks[1].id = SASL_CB_LIST_END;

Error: COMPILER_WARNING (CWE-843): [#def247]
cyrus-sasl-2.1.28/tests/t_gssapi_cli.c:145:29: warning[-Wcast-function-type]: cast between incompatible function types from ‘int (*)(void *, int,  const char **, unsigned int *)’ to ‘int (*)(void)’
#  145 |         callbacks[1].proc = (sasl_callback_ft)&get_user;
#      |                             ^
#  143|   
#  144|           callbacks[1].id = SASL_CB_AUTHNAME;
#  145|->         callbacks[1].proc = (sasl_callback_ft)&get_user;
#  146|   
#  147|           callbacks[2].id = SASL_CB_PASS;

Error: COMPILER_WARNING (CWE-843): [#def248]
cyrus-sasl-2.1.28/tests/t_gssapi_cli.c:148:29: warning[-Wcast-function-type]: cast between incompatible function types from ‘int (*)(sasl_conn_t *, void *, int,  sasl_secret_t **)’ {aka ‘int (*)(struct sasl_conn *, void *, int,  struct sasl_secret **)’} to ‘int (*)(void)’
#  148 |         callbacks[2].proc = (sasl_callback_ft)&get_pass;
#      |                             ^
#  146|   
#  147|           callbacks[2].id = SASL_CB_PASS;
#  148|->         callbacks[2].proc = (sasl_callback_ft)&get_pass;
#  149|       }
#  150|   

Error: GCC_ANALYZER_WARNING: [#def249]
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:38:11: warning[-Wanalyzer-fd-use-without-check]: ‘listen’ on possibly invalid file descriptor ‘sock’
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:29:8: branch_true: following ‘true’ branch (when ‘sock < 0’)...
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:29:43: branch_true: ...to here
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:38:11: danger: ‘sock’ could be invalid
#   36|       if (ret != 0) s_error("bind", 0, 0, errno);
#   37|   
#   38|->     ret = listen(sock, 1);
#   39|       if (ret != 0) s_error("listen", 0, 0, errno);
#   40|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def250]
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:39:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:28:12: acquire_resource: stream socket created here
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:29:8: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:31:5: branch_false: ...to here
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:39:8: branch_true: following ‘true’ branch (when ‘ret != 0’)...
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:39:43: branch_true: ...to here
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:39:19: danger: ‘sock’ leaks here
#   37|   
#   38|       ret = listen(sock, 1);
#   39|->     if (ret != 0) s_error("listen", 0, 0, errno);
#   40|   
#   41|       /* signal we are ready */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def251]
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:43:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:28:12: acquire_resource: stream socket created here
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:29:8: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:31:5: branch_false: ...to here
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:39:8: branch_false: following ‘false’ branch (when ‘ret == 0’)...
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:42:5: branch_false: ...to here
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:43:5: danger: ‘sock’ leaks here
#   41|       /* signal we are ready */
#   42|       fprintf(stdout, "READY\n");
#   43|->     fflush(stdout);
#   44|   
#   45|       /* block until the client connects */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def252]
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:46:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:28:12: acquire_resource: stream socket created here
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:29:8: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:31:5: branch_false: ...to here
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:39:8: branch_false: following ‘false’ branch (when ‘ret == 0’)...
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:42:5: branch_false: ...to here
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:46:10: danger: ‘sock’ leaks here
#   44|   
#   45|       /* block until the client connects */
#   46|->     sd = accept(sock, NULL, NULL);
#   47|       if (sd < 0) s_error("accept", 0, 0, errno);
#   48|   

Error: COMPILER_WARNING (CWE-681): [#def253]
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c: scope_hint: In function ‘main’
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:101:27: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘parse_cb’ differ in signedness
#  101 |             parse_cb(&cb, cb_buf, 256, optarg);
#      |                           ^~~~~~
#      |                           |
#      |                           unsigned char *
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:5: included_from: Included from here.
cyrus-sasl-2.1.28/tests/t_common.h:19:49: note: expected ‘char *’ but argument is of type ‘unsigned char *’
#   19 | void parse_cb(sasl_channel_binding_t *cb, char *buf, unsigned max, char *in);
#      |                                           ~~~~~~^~~
#   99|           switch (c) {
#  100|           case 'c':
#  101|->             parse_cb(&cb, cb_buf, 256, optarg);
#  102|               break;
#  103|           case 'P':

Error: COMPILER_WARNING (CWE-843): [#def254]
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:120:25: warning[-Wcast-function-type]: cast between incompatible function types from ‘int (*)(void *, const char **)’ to ‘int (*)(void)’
#  120 |     callbacks[0].proc = (sasl_callback_ft)&getpath;
#      |                         ^
#  118|       /* initialize the sasl library */
#  119|       callbacks[0].id = SASL_CB_GETPATH;
#  120|->     callbacks[0].proc = (sasl_callback_ft)&getpath;
#  121|       callbacks[0].context = NULL;
#  122|       callbacks[1].id = SASL_CB_GETOPT;

Error: COMPILER_WARNING (CWE-843): [#def255]
cyrus-sasl-2.1.28/tests/t_gssapi_srv.c:123:25: warning[-Wcast-function-type]: cast between incompatible function types from ‘int (*)(void *, const char *, const char *, const char **, unsigned int *)’ to ‘int (*)(void)’
#  123 |     callbacks[1].proc = (sasl_callback_ft)&test_getopt;
#      |                         ^
#  121|       callbacks[0].context = NULL;
#  122|       callbacks[1].id = SASL_CB_GETOPT;
#  123|->     callbacks[1].proc = (sasl_callback_ft)&test_getopt;
#  124|       callbacks[1].context = NULL;
#  125|       callbacks[2].id = SASL_CB_LIST_END;

Error: COMPILER_WARNING (CWE-843): [#def256]
cyrus-sasl-2.1.28/utils/cyrusbdb2current.c:211:23: warning[-Wcast-function-type]: cast between incompatible function types from ‘int (*)(void *, const char *, const char *, const char **, unsigned int *)’ to ‘int (*)(void)’
#  211 |     { SASL_CB_GETOPT, (int (*)(void))&good_getopt, NULL },
#      |                       ^
#  209|   
#  210|   static struct sasl_callback goodsasl_cb[] = {
#  211|->     { SASL_CB_GETOPT, (int (*)(void))&good_getopt, NULL },
#  212|       { SASL_CB_LIST_END, NULL, NULL }
#  213|   };

Error: COMPILER_WARNING (CWE-843): [#def257]
cyrus-sasl-2.1.28/utils/cyrusbdb2current.c: scope_hint: In function ‘main’
cyrus-sasl-2.1.28/utils/cyrusbdb2current.c:276:19: warning[-Wcast-function-type]: cast between incompatible function types from ‘void (*)(const char *, const char *, const char *, const char *, unsigned int)’ to ‘void * (*)(const char *, const char *, const char *, const char *, unsigned int)’
#  276 |     listusers(db, (listcb_t *) &listusers_cb);
#      |                   ^
#  274|       getchar();
#  275|   
#  276|->     listusers(db, (listcb_t *) &listusers_cb);
#  277|   
#  278|       sasl_dispose(&globalconn);

Error: COMPILER_WARNING (CWE-843): [#def258]
cyrus-sasl-2.1.28/utils/dbconverter-2.c:382:23: warning[-Wcast-function-type]: cast between incompatible function types from ‘int (*)(void *, const char *, const char *, const char **, unsigned int *)’ to ‘int (*)(void)’
#  382 |     { SASL_CB_GETOPT, (int (*)(void))&good_getopt, NULL },
#      |                       ^
#  380|   
#  381|   static struct sasl_callback goodsasl_cb[] = {
#  382|->     { SASL_CB_GETOPT, (int (*)(void))&good_getopt, NULL },
#  383|       { SASL_CB_LIST_END, NULL, NULL }
#  384|   };

Error: COMPILER_WARNING (CWE-843): [#def259]
cyrus-sasl-2.1.28/utils/dbconverter-2.c: scope_hint: In function ‘main’
cyrus-sasl-2.1.28/utils/dbconverter-2.c:431:19: warning[-Wcast-function-type]: cast between incompatible function types from ‘void (*)(const char *, const char *, const char *, const char *, unsigned int)’ to ‘void * (*)(const char *, const char *, const char *, const char *, unsigned int)’
#  431 |     listusers(db, (listcb_t *) &listusers_cb);
#      |                   ^
#  429|       getchar();
#  430|   
#  431|->     listusers(db, (listcb_t *) &listusers_cb);
#  432|   
#  433|       sasl_dispose(&globalconn);

Error: COMPILER_WARNING (CWE-843): [#def260]
cyrus-sasl-2.1.28/utils/pluginviewer.c: scope_hint: In function ‘main’
cyrus-sasl-2.1.28/utils/pluginviewer.c:559:22: warning[-Wcast-function-type]: cast between incompatible function types from ‘int (*)(void *, int,  const char *)’ to ‘int (*)(void)’
#  559 |     callback->proc = (sasl_callback_ft)&sasl_my_log;
#      |                      ^
#  557|       /* log */
#  558|       callback->id = SASL_CB_LOG;
#  559|->     callback->proc = (sasl_callback_ft)&sasl_my_log;
#  560|       callback->context = NULL;
#  561|       ++callback;

Error: COMPILER_WARNING (CWE-843): [#def261]
cyrus-sasl-2.1.28/utils/pluginviewer.c:566:26: warning[-Wcast-function-type]: cast between incompatible function types from ‘int (*)(void *, const char **)’ to ‘int (*)(void)’
#  566 |         callback->proc = (sasl_callback_ft)&getpath;
#      |                          ^
#  564|       if (searchpath) {
#  565|           callback->id = SASL_CB_GETPATH;
#  566|->         callback->proc = (sasl_callback_ft)&getpath;
#  567|           callback->context = searchpath;
#  568|           ++callback;

Error: COMPILER_WARNING (CWE-843): [#def262]
cyrus-sasl-2.1.28/utils/pluginviewer.c:575:22: warning[-Wcast-function-type]: cast between incompatible function types from ‘int (*)(void *, const char *, const char *, const char **, unsigned int *)’ to ‘int (*)(void)’
#  575 |     callback->proc = (sasl_callback_ft)&plugview_sasl_getopt;
#      |                      ^
#  573|          on client side SASL plugins, which just never query this option */
#  574|       callback->id = SASL_CB_GETOPT;
#  575|->     callback->proc = (sasl_callback_ft)&plugview_sasl_getopt;
#  576|       callback->context = NULL;
#  577|       ++callback;

Error: COMPILER_WARNING (CWE-843): [#def263]
cyrus-sasl-2.1.28/utils/sasldblistusers.c:91:23: warning[-Wcast-function-type]: cast between incompatible function types from ‘int (*)(void *, const char *, const char *, const char **, unsigned int *)’ to ‘int (*)(void)’
#   91 |     { SASL_CB_GETOPT, (sasl_callback_ft)&good_getopt, NULL },
#      |                       ^
#   89|   
#   90|   static struct sasl_callback goodsasl_cb[] = {
#   91|->     { SASL_CB_GETOPT, (sasl_callback_ft)&good_getopt, NULL },
#   92|       { SASL_CB_LIST_END, NULL, NULL }
#   93|   };

Error: COMPILER_WARNING (CWE-843): [#def264]
cyrus-sasl-2.1.28/utils/saslpasswd.c:256:23: warning[-Wcast-function-type]: cast between incompatible function types from ‘int (*)(void *, const char *, const char *, const char **, unsigned int *)’ to ‘int (*)(void)’
#  256 |     { SASL_CB_GETOPT, (sasl_callback_ft)&good_getopt, NULL },
#      |                       ^
#  254|   
#  255|   static struct sasl_callback goodsasl_cb[] = {
#  256|->     { SASL_CB_GETOPT, (sasl_callback_ft)&good_getopt, NULL },
#  257|       { SASL_CB_LIST_END, NULL, NULL }
#  258|   };

Scan Properties

analyzer-version-clippy1.90.0
analyzer-version-cppcheck2.18.3
analyzer-version-gcc15.2.1
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-135.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-gcc-latest-x86_64
project-namecyrus-sasl-2.1.28-33.fc44
store-results-to/tmp/tmprk2uxa5t/cyrus-sasl-2.1.28-33.fc44.tar.xz
time-created2025-10-28 17:41:36
time-finished2025-10-28 17:44:02
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmprk2uxa5t/cyrus-sasl-2.1.28-33.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmprk2uxa5t/cyrus-sasl-2.1.28-33.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9