dnsmasq-2.91-1.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
dnsmasq-2.91/contrib/lease-tools/dhcp_lease_time.c:187:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
dnsmasq-2.91/contrib/lease-tools/dhcp_lease_time.c:141:12: acquire_resource: datagram socket created here
dnsmasq-2.91/contrib/lease-tools/dhcp_lease_time.c:144:6: branch_false: following ‘false’ branch (when ‘argc > 1’)...
dnsmasq-2.91/contrib/lease-tools/dhcp_lease_time.c:150:6: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_lease_time.c:150:6: branch_false: following ‘false’ branch (when ‘fd != -1’)...
dnsmasq-2.91/contrib/lease-tools/dhcp_lease_time.c:156:7: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_lease_time.c:156:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_lease_time.c:162:3: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_lease_time.c:187:7: throw: if ‘sendto’ throws an exception...
dnsmasq-2.91/contrib/lease-tools/dhcp_lease_time.c:187:7: danger: ‘fd’ leaks here
#  185|     dest.sin_port = ntohs(DHCP_SERVER_PORT);
#  186|     
#  187|->   if (sendto(fd, &packet, sizeof(packet), 0, 
#  188|   	     (struct sockaddr *)&dest, sizeof(dest)) == -1)
#  189|       {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def2]
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:204:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘nl’
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:258:5: enter_function: entry to ‘main’
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:267:12: acquire_resource: socket created here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:269:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:275:7: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:275:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:283:3: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:286:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:292:7: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:292:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:298:12: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:298:12: call_function: calling ‘find_interface’ from ‘main’
#  202|     req.g.rtgen_family = AF_INET; 
#  203|   
#  204|->   if (sendto(fd, (void *)&req, sizeof(req), 0, 
#  205|   	     (struct sockaddr *)&addr, sizeof(addr)) == -1)
#  206|       {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def3]
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:277:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:266:12: acquire_resource: datagram socket created here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:269:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:275:7: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:275:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:277:7: branch_true: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:277:7: throw: if ‘perror’ throws an exception...
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:277:7: danger: ‘fd’ leaks here
#  275|     if (fd == -1 || nl == -1)
#  276|       {
#  277|->       perror("cannot create socket");
#  278|         exit(1);
#  279|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def4]
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:277:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘nl’
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:267:12: acquire_resource: socket created here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:269:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:275:7: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:275:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:277:7: branch_true: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:277:7: throw: if ‘perror’ throws an exception...
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:277:7: danger: ‘nl’ leaks here
#  275|     if (fd == -1 || nl == -1)
#  276|       {
#  277|->       perror("cannot create socket");
#  278|         exit(1);
#  279|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def5]
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:288:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘nl’
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:267:12: acquire_resource: socket created here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:269:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:275:7: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:275:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:283:3: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:286:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:288:7: branch_true: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:288:7: throw: if ‘perror’ throws an exception...
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:288:7: danger: ‘nl’ leaks here
#  286|     if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof(ifr)) == -1)
#  287|       {
#  288|->       perror("cannot setup interface");
#  289|         exit(1);
#  290|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def6]
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:294:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘nl’
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:267:12: acquire_resource: socket created here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:269:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:275:7: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:275:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:283:3: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:286:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:292:7: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:292:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:294:7: branch_true: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:294:7: throw: if ‘perror’ throws an exception...
dnsmasq-2.91/contrib/lease-tools/dhcp_release.c:294:7: danger: ‘nl’ leaks here
#  292|     if (inet_pton(AF_INET, argv[2], &lease.s_addr) < 1)
#  293|       {
#  294|->       perror("invalid ip address");
#  295|         exit(1);
#  296|       }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def7]
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:226:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘&client_option’
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:212:21: enter_function: entry to ‘create_release_packet’
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:221:39: call_function: calling ‘create_client_id_option’ from ‘create_release_packet’
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:221:39: return_function: returning to ‘create_release_packet’ from ‘create_client_id_option’
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:222:39: call_function: calling ‘create_server_id_option’ from ‘create_release_packet’
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:222:39: return_function: returning to ‘create_release_packet’ from ‘create_server_id_option’
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:223:46: call_function: calling ‘create_iaadr_option’ from ‘create_release_packet’
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:223:46: return_function: returning to ‘create_release_packet’ from ‘create_iaadr_option’
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:226:3: danger: use of uninitialized value ‘&client_option’ here
#  224|     struct dhcp6_iana_option iana_option = create_iana_option(iaid, iaaddr_option);
#  225|     int offset = 4;
#  226|->   memcpy(result.buf + offset, &client_option, ntohs(client_option.len) + 2*sizeof(uint16_t));
#  227|     offset += (ntohs(client_option.len)+ 2 *sizeof(uint16_t) );
#  228|     memcpy(result.buf + offset, &server_option, ntohs(server_option.len) + 2*sizeof(uint16_t) );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def8]
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:323:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:327:5: enter_function: entry to ‘send_release_packet’
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:331:14: acquire_resource: datagram socket created here
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:333:6: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:339:49: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:339:8: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:346:5: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:352:8: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:354:9: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:354:8: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:356:9: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:356:8: branch_true: following ‘true’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:357:7: branch_true: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:357:7: call_function: calling ‘fail_fatal’ from ‘send_release_packet’
#  321|   static void fail_fatal(const char *errstr, int exitcode)
#  322|   {
#  323|->   perror(errstr);
#  324|     exit(exitcode);
#  325|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def9]
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:355:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:331:14: acquire_resource: datagram socket created here
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:333:6: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:339:49: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:339:8: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:346:5: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:352:8: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:354:9: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:354:9: acquire_resource: socket created here
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:354:8: branch_true: following ‘true’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:355:7: branch_true: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:355:7: throw: if ‘perror’ throws an exception...
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:355:7: danger: ‘sock’ leaks here
#  353|         fail_fatal("inet_pton", 5);
#  354|       if (bind(sock, (struct sockaddr*)&client_addr, sizeof(struct sockaddr_in6)) != 0)
#  355|->       perror("bind"); /* continue on bind error */
#  356|       if (inet_pton(AF_INET6, DHCP6_MULTICAST_ADDRESS, &server_addr.sin6_addr) <= 0)
#  357|         fail_fatal("inet_pton", 5);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def10]
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:363:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:331:14: acquire_resource: datagram socket created here
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:333:6: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:339:49: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:339:8: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:346:5: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:352:8: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:354:9: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:354:8: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:356:9: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:356:8: branch_false: following ‘false’ branch...
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:358:5: branch_false: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:361:17: branch_true: following ‘true’ branch (when ‘i != 5’)...
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:363:13: branch_true: ...to here
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:363:13: throw: if ‘sendto’ throws an exception...
dnsmasq-2.91/contrib/lease-tools/dhcp_release6.c:363:13: danger: ‘sock’ leaks here
#  361|       for (i = 0; i < 5; i++)
#  362|         {
#  363|->         if (sendto(sock, packet->buf, packet->len, 0, (struct sockaddr *)&server_addr, sizeof(server_addr)) < 0)
#  364|   	  fail_fatal("sendto failed", 4);
#  365|   	

Error: CPPCHECK_WARNING (CWE-682): [#def11]
dnsmasq-2.91/src/cache.c:236: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
#  234|     const unsigned char *mix_tab = (const unsigned char*)typestr; 
#  235|   
#  236|->   while((c = (unsigned char) *name++))
#  237|       {
#  238|         /* don't use tolower and friends here - they may be messed up by LOCALE */

Error: CPPCHECK_WARNING (CWE-476): [#def12]
dnsmasq-2.91/src/cache.c:236: warning[nullPointer]: Possible null pointer dereference: name++
#  234|     const unsigned char *mix_tab = (const unsigned char*)typestr; 
#  235|   
#  236|->   while((c = (unsigned char) *name++))
#  237|       {
#  238|         /* don't use tolower and friends here - they may be messed up by LOCALE */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def13]
dnsmasq-2.91/src/cache.c:1283:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
dnsmasq-2.91/src/cache.c:1382:6: enter_function: entry to ‘cache_reload’
dnsmasq-2.91/src/cache.c:1497:10: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/cache.c:1498:87: branch_true: ...to here
dnsmasq-2.91/src/cache.c:1498:22: call_function: calling ‘read_hostsfile’ from ‘cache_reload’
# 1281|   {  
# 1282|     FILE *f = fopen(filename, "r");
# 1283|->   char *token = daemon->namebuff, *domain_suffix = NULL;
# 1284|     int names_done = 0, name_count = cache_size, lineno = 1;
# 1285|     unsigned int flags = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
dnsmasq-2.91/src/cache.c:1283:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
dnsmasq-2.91/src/cache.c:1382:6: enter_function: entry to ‘cache_reload’
dnsmasq-2.91/src/cache.c:1497:10: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/cache.c:1498:87: branch_true: ...to here
dnsmasq-2.91/src/cache.c:1498:22: call_function: calling ‘read_hostsfile’ from ‘cache_reload’
# 1281|   {  
# 1282|     FILE *f = fopen(filename, "r");
# 1283|->   char *token = daemon->namebuff, *domain_suffix = NULL;
# 1284|     int names_done = 0, name_count = cache_size, lineno = 1;
# 1285|     unsigned int flags = 0;

Error: COMPILER_WARNING (CWE-704): [#def15]
dnsmasq-2.91/src/dbus.c: scope_hint: In function ‘dbus_read_servers_ex’
dnsmasq-2.91/src/dbus.c:329:25: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  329 |           if ((str_addr = strrchr(str, '/')))
#      |                         ^
#  327|   
#  328|   	  /* point to address part of old string for error message */
#  329|-> 	  if ((str_addr = strrchr(str, '/')))
#  330|   	    str = str_addr+1;
#  331|   	  

Error: COMPILER_WARNING (CWE-704): [#def16]
dnsmasq-2.91/src/dbus.c:329:25: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  327|   
#  328|   	  /* point to address part of old string for error message */
#  329|-> 	  if ((str_addr = strrchr(str, '/')))
#  330|   	    str = str_addr+1;
#  331|   	  

Error: GCC_ANALYZER_WARNING (CWE-457): [#def17]
dnsmasq-2.91/src/dbus.c:512:11: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘val’
dnsmasq-2.91/src/dbus.c:510:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dbus.c:512:11: branch_true: ...to here
dnsmasq-2.91/src/dbus.c:512:11: danger: use of uninitialized value ‘val’ here
#  510|     if (!reply)
#  511|       {
#  512|->       if (val)
#  513|   	set_option_bool(flag);
#  514|         else

Error: COMPILER_WARNING: [#def18]
dnsmasq-2.91/src/dbus.c:748:22: warning[-Wunused-but-set-variable=]: variable ‘queries’ set but not used
#  748 |         unsigned int queries = 0, failed_queries = 0, nxdomain_replies = 0, retrys = 0;
#      |                      ^~~~~~~
#  746|         {
#  747|   	unsigned int port;
#  748|-> 	unsigned int queries = 0, failed_queries = 0, nxdomain_replies = 0, retrys = 0;
#  749|   	unsigned int sigma_latency = 0, count_latency = 0;
#  750|   	

Error: COMPILER_WARNING: [#def19]
dnsmasq-2.91/src/dbus.c:748:35: warning[-Wunused-but-set-variable=]: variable ‘failed_queries’ set but not used
#  748 |         unsigned int queries = 0, failed_queries = 0, nxdomain_replies = 0, retrys = 0;
#      |                                   ^~~~~~~~~~~~~~
#  746|         {
#  747|   	unsigned int port;
#  748|-> 	unsigned int queries = 0, failed_queries = 0, nxdomain_replies = 0, retrys = 0;
#  749|   	unsigned int sigma_latency = 0, count_latency = 0;
#  750|   	

Error: COMPILER_WARNING: [#def20]
dnsmasq-2.91/src/dbus.c:748:55: warning[-Wunused-but-set-variable=]: variable ‘nxdomain_replies’ set but not used
#  748 |         unsigned int queries = 0, failed_queries = 0, nxdomain_replies = 0, retrys = 0;
#      |                                                       ^~~~~~~~~~~~~~~~
#  746|         {
#  747|   	unsigned int port;
#  748|-> 	unsigned int queries = 0, failed_queries = 0, nxdomain_replies = 0, retrys = 0;
#  749|   	unsigned int sigma_latency = 0, count_latency = 0;
#  750|   	

Error: COMPILER_WARNING: [#def21]
dnsmasq-2.91/src/dbus.c: scope_hint: In function ‘dbus_get_server_metrics’
dnsmasq-2.91/src/dbus.c:748:77: warning[-Wunused-but-set-variable=]: variable ‘retrys’ set but not used
#  748 |         unsigned int queries = 0, failed_queries = 0, nxdomain_replies = 0, retrys = 0;
#      |                                                                             ^~~~~~
#  746|         {
#  747|   	unsigned int port;
#  748|-> 	unsigned int queries = 0, failed_queries = 0, nxdomain_replies = 0, retrys = 0;
#  749|   	unsigned int sigma_latency = 0, count_latency = 0;
#  750|   	

Error: GCC_ANALYZER_WARNING (CWE-457): [#def22]
dnsmasq-2.91/src/dbus.c:853:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘enabled’
dnsmasq-2.91/src/dbus.c:793:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dbus.c:806:12: branch_false: ...to here
dnsmasq-2.91/src/dbus.c:806:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
dnsmasq-2.91/src/dbus.c:814:12: branch_false: ...to here
dnsmasq-2.91/src/dbus.c:814:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
dnsmasq-2.91/src/dbus.c:819:12: branch_false: ...to here
dnsmasq-2.91/src/dbus.c:819:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
dnsmasq-2.91/src/dbus.c:824:12: branch_false: ...to here
dnsmasq-2.91/src/dbus.c:824:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
dnsmasq-2.91/src/dbus.c:829:12: branch_false: ...to here
dnsmasq-2.91/src/dbus.c:829:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
dnsmasq-2.91/src/dbus.c:834:12: branch_false: ...to here
dnsmasq-2.91/src/dbus.c:834:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
dnsmasq-2.91/src/dbus.c:838:12: branch_false: ...to here
dnsmasq-2.91/src/dbus.c:838:11: branch_true: following ‘true’ branch (when the strings are equal)...
dnsmasq-2.91/src/dbus.c:844:21: branch_true: ...to here
dnsmasq-2.91/src/dbus.c:844:10: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dbus.c:846:15: branch_true: ...to here
dnsmasq-2.91/src/dbus.c:853:21: danger: use of uninitialized value ‘enabled’ here
#  851|   	    }
#  852|   
#  853|-> 	  list.rr = enabled ? T_A : 0;
#  854|   	}
#  855|       }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def23]
dnsmasq-2.91/src/dbus.c:871:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘enabled’
dnsmasq-2.91/src/dbus.c:793:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dbus.c:806:12: branch_false: ...to here
dnsmasq-2.91/src/dbus.c:806:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
dnsmasq-2.91/src/dbus.c:814:12: branch_false: ...to here
dnsmasq-2.91/src/dbus.c:814:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
dnsmasq-2.91/src/dbus.c:819:12: branch_false: ...to here
dnsmasq-2.91/src/dbus.c:819:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
dnsmasq-2.91/src/dbus.c:824:12: branch_false: ...to here
dnsmasq-2.91/src/dbus.c:824:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
dnsmasq-2.91/src/dbus.c:829:12: branch_false: ...to here
dnsmasq-2.91/src/dbus.c:829:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
dnsmasq-2.91/src/dbus.c:834:12: branch_false: ...to here
dnsmasq-2.91/src/dbus.c:834:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
dnsmasq-2.91/src/dbus.c:838:12: branch_false: ...to here
dnsmasq-2.91/src/dbus.c:838:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
dnsmasq-2.91/src/dbus.c:856:12: branch_false: ...to here
dnsmasq-2.91/src/dbus.c:856:11: branch_true: following ‘true’ branch (when the strings are equal)...
dnsmasq-2.91/src/dbus.c:862:21: branch_true: ...to here
dnsmasq-2.91/src/dbus.c:862:10: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dbus.c:864:15: branch_true: ...to here
dnsmasq-2.91/src/dbus.c:871:29: danger: use of uninitialized value ‘enabled’ here
#  869|   	    }
#  870|   	  
#  871|-> 	  list.rr = enabled ? T_AAAA : 0;
#  872|   	}
#  873|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def24]
dnsmasq-2.91/src/dhcp.c:53:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
dnsmasq-2.91/src/dhcp.c:40:12: acquire_resource: datagram socket created here
dnsmasq-2.91/src/dhcp.c:50:6: branch_false: following ‘false’ branch (when ‘fd != -1’)...
dnsmasq-2.91/src/dhcp.c:53:8: branch_false: ...to here
dnsmasq-2.91/src/dhcp.c:53:8: throw: if ‘fix_fd’ throws an exception...
dnsmasq-2.91/src/dhcp.c:53:8: danger: ‘fd’ leaks here
#   51|       die (_("cannot create DHCP socket: %s"), NULL, EC_BADNET);
#   52|     
#   53|->   if (!fix_fd(fd) ||
#   54|   #if defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DONT)
#   55|         setsockopt(fd, IPPROTO_IP, IP_MTU_DISCOVER, &mtu, sizeof(mtu)) == -1 ||

Error: CPPCHECK_WARNING (CWE-457): [#def25]
dnsmasq-2.91/src/dhcp.c:228: error[uninitvar]: Uninitialized variable: ifr
#  226|   #endif
#  227|   	
#  228|->   if (!indextoname(daemon->dhcpfd, iface_index, ifr.ifr_name) ||
#  229|         ioctl(daemon->dhcpfd, SIOCGIFFLAGS, &ifr) != 0)
#  230|       return;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def26]
dnsmasq-2.91/src/dhcp.c:877:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/etc/ethers", "r")’
dnsmasq-2.91/src/dhcp.c:875:13: acquire_resource: opened here
dnsmasq-2.91/src/dhcp.c:887:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dhcp.c:894:8: branch_false: ...to here
dnsmasq-2.91/src/dhcp.c:894:61: branch_true: following ‘true’ branch (when ‘config’ is non-NULL)...
dnsmasq-2.91/src/dhcp.c:896:7: branch_true: ...to here
dnsmasq-2.91/src/dhcp.c:897:10: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dhcp.c:899:11: branch_true: ...to here
dnsmasq-2.91/src/dhcp.c:901:14: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dhcp.c:903:16: branch_false: ...to here
dnsmasq-2.91/src/dhcp.c:894:61: branch_false: following ‘false’ branch (when ‘config’ is NULL)...
dnsmasq-2.91/src/dhcp.c:894:61: branch_false: ...to here
dnsmasq-2.91/src/dhcp.c:910:10: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dhcp.c:914:7: branch_true: ...to here
dnsmasq-2.91/src/dhcp.c:916:14: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dhcp.c:916:34: branch_true: ...to here
dnsmasq-2.91/src/dhcp.c:916:14: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dhcp.c:919:11: branch_false: ...to here
dnsmasq-2.91/src/dhcp.c:922:23: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dhcp.c:922:31: branch_true: ...to here
dnsmasq-2.91/src/dhcp.c:922:23: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dhcp.c:922:23: branch_false: ...to here
dnsmasq-2.91/src/dhcp.c:923:13: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dhcp.c:923:20: branch_true: ...to here
dnsmasq-2.91/src/dhcp.c:925:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dhcp.c:925:19: branch_false: ...to here
dnsmasq-2.91/src/dhcp.c:925:19: throw: if ‘parse_hex’ throws an exception...
dnsmasq-2.91/src/dhcp.c:877:22: danger: ‘fopen("/etc/ethers", "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  875|     FILE *f = fopen(ETHERSFILE, "r");
#  876|     unsigned int flags;
#  877|->   char *buff = daemon->namebuff;
#  878|     char *ip, *cp;
#  879|     struct in_addr addr;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
dnsmasq-2.91/src/dhcp.c:877:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/etc/ethers", "r")’
dnsmasq-2.91/src/dhcp.c:875:13: acquire_memory: allocated here
dnsmasq-2.91/src/dhcp.c:887:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dhcp.c:894:8: branch_false: ...to here
dnsmasq-2.91/src/dhcp.c:894:61: branch_true: following ‘true’ branch (when ‘config’ is non-NULL)...
dnsmasq-2.91/src/dhcp.c:896:7: branch_true: ...to here
dnsmasq-2.91/src/dhcp.c:897:10: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dhcp.c:899:11: branch_true: ...to here
dnsmasq-2.91/src/dhcp.c:901:14: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dhcp.c:903:16: branch_false: ...to here
dnsmasq-2.91/src/dhcp.c:894:61: branch_false: following ‘false’ branch (when ‘config’ is NULL)...
dnsmasq-2.91/src/dhcp.c:894:61: branch_false: ...to here
dnsmasq-2.91/src/dhcp.c:910:10: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dhcp.c:914:7: branch_true: ...to here
dnsmasq-2.91/src/dhcp.c:916:14: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dhcp.c:916:34: branch_true: ...to here
dnsmasq-2.91/src/dhcp.c:916:14: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dhcp.c:919:11: branch_false: ...to here
dnsmasq-2.91/src/dhcp.c:922:23: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dhcp.c:922:31: branch_true: ...to here
dnsmasq-2.91/src/dhcp.c:922:23: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dhcp.c:922:23: branch_false: ...to here
dnsmasq-2.91/src/dhcp.c:923:13: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dhcp.c:923:20: branch_true: ...to here
dnsmasq-2.91/src/dhcp.c:925:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dhcp.c:925:19: branch_false: ...to here
dnsmasq-2.91/src/dhcp.c:925:19: throw: if ‘parse_hex’ throws an exception...
dnsmasq-2.91/src/dhcp.c:877:22: danger: ‘fopen("/etc/ethers", "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  875|     FILE *f = fopen(ETHERSFILE, "r");
#  876|     unsigned int flags;
#  877|->   char *buff = daemon->namebuff;
#  878|     char *ip, *cp;
#  879|     struct in_addr addr;

Error: CPPCHECK_WARNING (CWE-457): [#def28]
dnsmasq-2.91/src/dhcp.c:1131: error[uninitvar]: Uninitialized variable: ifr
# 1129|   	    
# 1130|   	    if (relay->interface)
# 1131|-> 	      safe_strncpy(ifr.ifr_name, relay->interface, IF_NAMESIZE);
# 1132|   	    
# 1133|   	    if (!relay->interface || strchr(relay->interface, '*') ||

Error: CPPCHECK_WARNING (CWE-457): [#def29]
dnsmasq-2.91/src/dhcp6.c:134: error[uninitvar]: Uninitialized variable: ifr
#  132|         }
#  133|   
#  134|->   if (!indextoname(daemon->dhcp6fd, if_index, ifr.ifr_name))
#  135|       return;
#  136|     

Error: GCC_ANALYZER_WARNING (CWE-775): [#def30]
dnsmasq-2.91/src/dnsmasq.c:157:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor
dnsmasq-2.91/src/dnsmasq.c:156:15: branch_true: following ‘true’ branch (when ‘i != 3’)...
dnsmasq-2.91/src/dnsmasq.c:157:5: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:157:5: danger: leaks here
#  155|        ensure that we're not using those fds for real stuff. */
#  156|     for (i = 0; i < 3; i++)
#  157|->     open("/dev/null", O_RDWR); 
#  158|     
#  159|     /* Close any file descriptors we inherited apart from std{in|out|err} */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
dnsmasq-2.91/src/dnsmasq.c:1428:7: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
dnsmasq-2.91/src/dnsmasq.c:1426:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:1427:21: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:1427:14: acquire_memory: allocated here
dnsmasq-2.91/src/dnsmasq.c:1426:7: branch_true: following ‘true’ branch (when ‘buf’ is non-NULL)...
dnsmasq-2.91/src/dnsmasq.c:1428:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:1428:7: throw: if ‘read_write’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:1428:7: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 1426|     if (evp->msg_sz != 0 && 
# 1427|         (buf = malloc(evp->msg_sz + 1)) &&
# 1428|->       read_write(fd, (unsigned char *)buf, evp->msg_sz, RW_READ))
# 1429|       {
# 1430|         buf[evp->msg_sz] = 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def32]
dnsmasq-2.91/src/dnsmasq.c:2034:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_true: following ‘true’ branch (when ‘p == -1’)...
dnsmasq-2.91/src/dnsmasq.c:2034:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2034:11: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2034:11: danger: ‘pipefd[0]’ leaks here
# 2032|   	{
# 2033|   	  /* fork failed */
# 2034|-> 	  close(pipefd[0]);
# 2035|   	  close(pipefd[1]);
# 2036|   	  goto closeconandreturn;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def33]
dnsmasq-2.91/src/dnsmasq.c:2034:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_true: following ‘true’ branch (when ‘p == -1’)...
dnsmasq-2.91/src/dnsmasq.c:2034:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2034:11: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2034:11: danger: ‘pipefd[1]’ leaks here
# 2032|   	{
# 2033|   	  /* fork failed */
# 2034|-> 	  close(pipefd[0]);
# 2035|   	  close(pipefd[1]);
# 2036|   	  goto closeconandreturn;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def34]
dnsmasq-2.91/src/dnsmasq.c:2035:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_true: following ‘true’ branch (when ‘p == -1’)...
dnsmasq-2.91/src/dnsmasq.c:2034:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2035:11: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2035:11: danger: ‘pipefd[1]’ leaks here
# 2033|   	  /* fork failed */
# 2034|   	  close(pipefd[0]);
# 2035|-> 	  close(pipefd[1]);
# 2036|   	  goto closeconandreturn;
# 2037|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def35]
dnsmasq-2.91/src/dnsmasq.c:2042:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_true: following ‘true’ branch (when ‘p != 0’)...
dnsmasq-2.91/src/dnsmasq.c:2042:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2042:11: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2042:11: danger: ‘pipefd[0]’ leaks here
# 2040|   	{
# 2041|   	  /* fork() done: parent side */
# 2042|-> 	  close(pipefd[1]); /* parent needs read pipe end. */
# 2043|         
# 2044|   #ifdef HAVE_LINUX_NETWORK

Error: GCC_ANALYZER_WARNING (CWE-775): [#def36]
dnsmasq-2.91/src/dnsmasq.c:2042:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_true: following ‘true’ branch (when ‘p != 0’)...
dnsmasq-2.91/src/dnsmasq.c:2042:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2042:11: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2042:11: danger: ‘pipefd[1]’ leaks here
# 2040|   	{
# 2041|   	  /* fork() done: parent side */
# 2042|-> 	  close(pipefd[1]); /* parent needs read pipe end. */
# 2043|         
# 2044|   #ifdef HAVE_LINUX_NETWORK

Error: GCC_ANALYZER_WARNING (CWE-775): [#def37]
dnsmasq-2.91/src/dnsmasq.c:2059:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_true: following ‘true’ branch (when ‘p != 0’)...
dnsmasq-2.91/src/dnsmasq.c:2042:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2059:11: throw: if ‘read_write’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2059:11: danger: ‘pipefd[0]’ leaks here
# 2057|   	     netlink socket. */
# 2058|   	  
# 2059|-> 	  read_write(pipefd[0], &a, 1, RW_READ);
# 2060|   #endif
# 2061|   	  

Error: GCC_ANALYZER_WARNING (CWE-775): [#def38]
dnsmasq-2.91/src/dnsmasq.c:2100:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_true: following ‘true’ branch (when ‘iface’ is non-NULL)...
dnsmasq-2.91/src/dnsmasq.c:2085:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2100:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2100:7: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2100:7: danger: ‘pipefd[0]’ leaks here
# 2098|   #ifdef HAVE_LINUX_NETWORK
# 2099|         /* See comment above re: netlink socket. */
# 2100|->       close(daemon->netlinkfd);
# 2101|         read_write(pipefd[1], &a, 1, RW_WRITE);
# 2102|   #endif		  

Error: GCC_ANALYZER_WARNING (CWE-775): [#def39]
dnsmasq-2.91/src/dnsmasq.c:2100:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: following ‘false’ branch (when ‘iface’ is NULL)...
dnsmasq-2.91/src/dnsmasq.c:2090:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2100:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2100:7: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2100:7: danger: ‘pipefd[1]’ leaks here
# 2098|   #ifdef HAVE_LINUX_NETWORK
# 2099|         /* See comment above re: netlink socket. */
# 2100|->       close(daemon->netlinkfd);
# 2101|         read_write(pipefd[1], &a, 1, RW_WRITE);
# 2102|   #endif		  

Error: GCC_ANALYZER_WARNING (CWE-775): [#def40]
dnsmasq-2.91/src/dnsmasq.c:2100:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[auth_dns]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: following ‘false’ branch (when ‘iface’ is NULL)...
dnsmasq-2.91/src/dnsmasq.c:2090:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2100:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2100:7: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2100:7: danger: ‘pipefd[auth_dns]’ leaks here
# 2098|   #ifdef HAVE_LINUX_NETWORK
# 2099|         /* See comment above re: netlink socket. */
# 2100|->       close(daemon->netlinkfd);
# 2101|         read_write(pipefd[1], &a, 1, RW_WRITE);
# 2102|   #endif		  

Error: GCC_ANALYZER_WARNING (CWE-775): [#def41]
dnsmasq-2.91/src/dnsmasq.c:2101:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_true: following ‘true’ branch (when ‘iface’ is non-NULL)...
dnsmasq-2.91/src/dnsmasq.c:2085:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2100:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2101:7: throw: if ‘read_write’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2101:7: danger: ‘pipefd[0]’ leaks here
# 2099|         /* See comment above re: netlink socket. */
# 2100|         close(daemon->netlinkfd);
# 2101|->       read_write(pipefd[1], &a, 1, RW_WRITE);
# 2102|   #endif		  
# 2103|         alarm(CHILD_LIFETIME);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def42]
dnsmasq-2.91/src/dnsmasq.c:2101:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: following ‘false’ branch (when ‘iface’ is NULL)...
dnsmasq-2.91/src/dnsmasq.c:2090:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2100:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2101:7: throw: if ‘read_write’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2101:7: danger: ‘pipefd[1]’ leaks here
# 2099|         /* See comment above re: netlink socket. */
# 2100|         close(daemon->netlinkfd);
# 2101|->       read_write(pipefd[1], &a, 1, RW_WRITE);
# 2102|   #endif		  
# 2103|         alarm(CHILD_LIFETIME);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def43]
dnsmasq-2.91/src/dnsmasq.c:2101:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[auth_dns]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: following ‘false’ branch (when ‘iface’ is NULL)...
dnsmasq-2.91/src/dnsmasq.c:2090:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2100:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2101:7: throw: if ‘read_write’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2101:7: danger: ‘pipefd[auth_dns]’ leaks here
# 2099|         /* See comment above re: netlink socket. */
# 2100|         close(daemon->netlinkfd);
# 2101|->       read_write(pipefd[1], &a, 1, RW_WRITE);
# 2102|   #endif		  
# 2103|         alarm(CHILD_LIFETIME);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def44]
dnsmasq-2.91/src/dnsmasq.c:2101:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pipefd[1]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: following ‘false’ branch (when ‘iface’ is NULL)...
dnsmasq-2.91/src/dnsmasq.c:2090:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2100:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2101:7: danger: use of uninitialized value ‘pipefd[1]’ here
# 2099|         /* See comment above re: netlink socket. */
# 2100|         close(daemon->netlinkfd);
# 2101|->       read_write(pipefd[1], &a, 1, RW_WRITE);
# 2102|   #endif		  
# 2103|         alarm(CHILD_LIFETIME);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def45]
dnsmasq-2.91/src/dnsmasq.c:2104:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_true: following ‘true’ branch (when ‘iface’ is non-NULL)...
dnsmasq-2.91/src/dnsmasq.c:2085:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2100:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2104:7: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2104:7: danger: ‘pipefd[0]’ leaks here
# 2102|   #endif		  
# 2103|         alarm(CHILD_LIFETIME);
# 2104|->       close(pipefd[0]); /* close read end in child. */
# 2105|         daemon->pipe_to_parent = pipefd[1];
# 2106|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def46]
dnsmasq-2.91/src/dnsmasq.c:2104:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[auth_dns]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: following ‘false’ branch (when ‘iface’ is NULL)...
dnsmasq-2.91/src/dnsmasq.c:2090:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2100:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2104:7: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2104:7: danger: ‘pipefd[auth_dns]’ leaks here
# 2102|   #endif		  
# 2103|         alarm(CHILD_LIFETIME);
# 2104|->       close(pipefd[0]); /* close read end in child. */
# 2105|         daemon->pipe_to_parent = pipefd[1];
# 2106|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
dnsmasq-2.91/src/dnsmasq.c:2111:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_true: following ‘true’ branch (when ‘iface’ is non-NULL)...
dnsmasq-2.91/src/dnsmasq.c:2085:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2111:16: throw: if ‘fcntl’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2111:16: danger: ‘pipefd[0]’ leaks here
# 2109|        attribute from the listening socket. 
# 2110|        Reset that here. */
# 2111|->   if ((flags = fcntl(confd, F_GETFL, 0)) != -1)
# 2112|       while(retry_send(fcntl(confd, F_SETFL, flags & ~O_NONBLOCK)));
# 2113|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def48]
dnsmasq-2.91/src/dnsmasq.c:2111:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: following ‘false’ branch (when ‘iface’ is NULL)...
dnsmasq-2.91/src/dnsmasq.c:2090:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2111:16: throw: if ‘fcntl’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2111:16: danger: ‘pipefd[1]’ leaks here
# 2109|        attribute from the listening socket. 
# 2110|        Reset that here. */
# 2111|->   if ((flags = fcntl(confd, F_GETFL, 0)) != -1)
# 2112|       while(retry_send(fcntl(confd, F_SETFL, flags & ~O_NONBLOCK)));
# 2113|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def49]
dnsmasq-2.91/src/dnsmasq.c:2111:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[auth_dns]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: following ‘false’ branch (when ‘iface’ is NULL)...
dnsmasq-2.91/src/dnsmasq.c:2090:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2111:16: throw: if ‘fcntl’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2111:16: danger: ‘pipefd[auth_dns]’ leaks here
# 2109|        attribute from the listening socket. 
# 2110|        Reset that here. */
# 2111|->   if ((flags = fcntl(confd, F_GETFL, 0)) != -1)
# 2112|       while(retry_send(fcntl(confd, F_SETFL, flags & ~O_NONBLOCK)));
# 2113|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
dnsmasq-2.91/src/dnsmasq.c:2112:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_true: following ‘true’ branch (when ‘iface’ is non-NULL)...
dnsmasq-2.91/src/dnsmasq.c:2085:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2111:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:6: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2112:11: throw: if ‘retry_send’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2112:11: danger: ‘pipefd[0]’ leaks here
# 2110|        Reset that here. */
# 2111|     if ((flags = fcntl(confd, F_GETFL, 0)) != -1)
# 2112|->     while(retry_send(fcntl(confd, F_SETFL, flags & ~O_NONBLOCK)));
# 2113|   
# 2114|     buff = tcp_request(confd, now, &tcp_addr, netmask, auth_dns);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def51]
dnsmasq-2.91/src/dnsmasq.c:2112:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: following ‘false’ branch (when ‘iface’ is NULL)...
dnsmasq-2.91/src/dnsmasq.c:2090:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2111:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:6: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2112:11: throw: if ‘retry_send’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2112:11: danger: ‘pipefd[1]’ leaks here
# 2110|        Reset that here. */
# 2111|     if ((flags = fcntl(confd, F_GETFL, 0)) != -1)
# 2112|->     while(retry_send(fcntl(confd, F_SETFL, flags & ~O_NONBLOCK)));
# 2113|   
# 2114|     buff = tcp_request(confd, now, &tcp_addr, netmask, auth_dns);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def52]
dnsmasq-2.91/src/dnsmasq.c:2112:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[auth_dns]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: following ‘false’ branch (when ‘iface’ is NULL)...
dnsmasq-2.91/src/dnsmasq.c:2090:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2111:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:6: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2112:11: throw: if ‘retry_send’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2112:11: danger: ‘pipefd[auth_dns]’ leaks here
# 2110|        Reset that here. */
# 2111|     if ((flags = fcntl(confd, F_GETFL, 0)) != -1)
# 2112|->     while(retry_send(fcntl(confd, F_SETFL, flags & ~O_NONBLOCK)));
# 2113|   
# 2114|     buff = tcp_request(confd, now, &tcp_addr, netmask, auth_dns);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
dnsmasq-2.91/src/dnsmasq.c:2112:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_true: following ‘true’ branch (when ‘iface’ is non-NULL)...
dnsmasq-2.91/src/dnsmasq.c:2085:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2111:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:6: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2112:22: throw: if ‘fcntl’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2112:22: danger: ‘pipefd[0]’ leaks here
# 2110|        Reset that here. */
# 2111|     if ((flags = fcntl(confd, F_GETFL, 0)) != -1)
# 2112|->     while(retry_send(fcntl(confd, F_SETFL, flags & ~O_NONBLOCK)));
# 2113|   
# 2114|     buff = tcp_request(confd, now, &tcp_addr, netmask, auth_dns);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def54]
dnsmasq-2.91/src/dnsmasq.c:2112:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: following ‘false’ branch (when ‘iface’ is NULL)...
dnsmasq-2.91/src/dnsmasq.c:2090:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2111:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:6: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2112:22: throw: if ‘fcntl’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2112:22: danger: ‘pipefd[1]’ leaks here
# 2110|        Reset that here. */
# 2111|     if ((flags = fcntl(confd, F_GETFL, 0)) != -1)
# 2112|->     while(retry_send(fcntl(confd, F_SETFL, flags & ~O_NONBLOCK)));
# 2113|   
# 2114|     buff = tcp_request(confd, now, &tcp_addr, netmask, auth_dns);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def55]
dnsmasq-2.91/src/dnsmasq.c:2112:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[auth_dns]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: following ‘false’ branch (when ‘iface’ is NULL)...
dnsmasq-2.91/src/dnsmasq.c:2090:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2111:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:6: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2112:22: throw: if ‘fcntl’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2112:22: danger: ‘pipefd[auth_dns]’ leaks here
# 2110|        Reset that here. */
# 2111|     if ((flags = fcntl(confd, F_GETFL, 0)) != -1)
# 2112|->     while(retry_send(fcntl(confd, F_SETFL, flags & ~O_NONBLOCK)));
# 2113|   
# 2114|     buff = tcp_request(confd, now, &tcp_addr, netmask, auth_dns);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def56]
dnsmasq-2.91/src/dnsmasq.c:2114:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2111:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2114:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2114:10: throw: if ‘tcp_request’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2114:10: danger: ‘pipefd[0]’ leaks here
# 2112|       while(retry_send(fcntl(confd, F_SETFL, flags & ~O_NONBLOCK)));
# 2113|   
# 2114|->   buff = tcp_request(confd, now, &tcp_addr, netmask, auth_dns);
# 2115|   	      
# 2116|     if (buff)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def57]
dnsmasq-2.91/src/dnsmasq.c:2114:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2111:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2114:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2114:10: throw: if ‘tcp_request’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2114:10: danger: ‘pipefd[1]’ leaks here
# 2112|       while(retry_send(fcntl(confd, F_SETFL, flags & ~O_NONBLOCK)));
# 2113|   
# 2114|->   buff = tcp_request(confd, now, &tcp_addr, netmask, auth_dns);
# 2115|   	      
# 2116|     if (buff)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def58]
dnsmasq-2.91/src/dnsmasq.c:2123:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2119:29: branch_true: following ‘true’ branch (when ‘s’ is non-NULL)...
dnsmasq-2.91/src/dnsmasq.c:2120:9: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2123:9: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2123:9: danger: ‘pipefd[0]’ leaks here
# 2121|         {
# 2122|   	shutdown(s->tcpfd, SHUT_RDWR);
# 2123|-> 	close(s->tcpfd);
# 2124|   	s->tcpfd = -1;
# 2125|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def59]
dnsmasq-2.91/src/dnsmasq.c:2123:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2119:29: branch_true: following ‘true’ branch (when ‘s’ is non-NULL)...
dnsmasq-2.91/src/dnsmasq.c:2120:9: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2123:9: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2123:9: danger: ‘pipefd[1]’ leaks here
# 2121|         {
# 2122|   	shutdown(s->tcpfd, SHUT_RDWR);
# 2123|-> 	close(s->tcpfd);
# 2124|   	s->tcpfd = -1;
# 2125|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def60]
dnsmasq-2.91/src/dnsmasq.c:2129:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2127:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2129:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2129:7: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2129:7: danger: ‘pipefd[0]’ leaks here
# 2127|     if (!option_bool(OPT_DEBUG))
# 2128|       {
# 2129|->       close(daemon->pipe_to_parent);
# 2130|         flush_log();
# 2131|         _exit(0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def61]
dnsmasq-2.91/src/dnsmasq.c:2129:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2127:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2129:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2129:7: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2129:7: danger: ‘pipefd[1]’ leaks here
# 2127|     if (!option_bool(OPT_DEBUG))
# 2128|       {
# 2129|->       close(daemon->pipe_to_parent);
# 2130|         flush_log();
# 2131|         _exit(0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def62]
dnsmasq-2.91/src/dnsmasq.c:2130:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2127:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2129:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2130:7: throw: if ‘flush_log’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2130:7: danger: ‘pipefd[0]’ leaks here
# 2128|       {
# 2129|         close(daemon->pipe_to_parent);
# 2130|->       flush_log();
# 2131|         _exit(0);
# 2132|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def63]
dnsmasq-2.91/src/dnsmasq.c:2130:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2127:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2129:7: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2130:7: throw: if ‘flush_log’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2130:7: danger: ‘pipefd[1]’ leaks here
# 2128|       {
# 2129|         close(daemon->pipe_to_parent);
# 2130|->       flush_log();
# 2131|         _exit(0);
# 2132|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def64]
dnsmasq-2.91/src/dnsmasq.c:2133:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2127:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2133:1: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2133:1: danger: ‘pipefd[0]’ leaks here
# 2131|         _exit(0);
# 2132|       }
# 2133|-> }
# 2134|   
# 2135|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def65]
dnsmasq-2.91/src/dnsmasq.c:2133:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
dnsmasq-2.91/src/dnsmasq.c:1953:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1956:7: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:1956:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:1975:3: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2026:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2028:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2028:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2031:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2031:10: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2039:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2083:6: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2096:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2111:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2127:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2133:1: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2133:1: danger: ‘pipefd[1]’ leaks here
# 2131|         _exit(0);
# 2132|       }
# 2133|-> }
# 2134|   
# 2135|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def66]
dnsmasq-2.91/src/dnsmasq.c:2170:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:2151:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2156:21: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2165:10: branch_false: following ‘false’ branch (when ‘i >= 0’)...
dnsmasq-2.91/src/dnsmasq.c:2165:20: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2165:11: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2168:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2168:10: branch_true: following ‘true’ branch (when ‘p != 0’)...
dnsmasq-2.91/src/dnsmasq.c:2170:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2170:11: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2170:11: danger: ‘pipefd[0]’ leaks here
# 2168|         if ((p = fork()) != 0)
# 2169|   	{
# 2170|-> 	  close(pipefd[1]); /* parent needs read pipe end. */
# 2171|   	  if (p == -1)
# 2172|   	    {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def67]
dnsmasq-2.91/src/dnsmasq.c:2170:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
dnsmasq-2.91/src/dnsmasq.c:2151:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2156:21: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2165:10: branch_false: following ‘false’ branch (when ‘i >= 0’)...
dnsmasq-2.91/src/dnsmasq.c:2165:20: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2165:11: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2168:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2168:10: branch_true: following ‘true’ branch (when ‘p != 0’)...
dnsmasq-2.91/src/dnsmasq.c:2170:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2170:11: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2170:11: danger: ‘pipefd[1]’ leaks here
# 2168|         if ((p = fork()) != 0)
# 2169|   	{
# 2170|-> 	  close(pipefd[1]); /* parent needs read pipe end. */
# 2171|   	  if (p == -1)
# 2172|   	    {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def68]
dnsmasq-2.91/src/dnsmasq.c:2174:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:2151:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2156:21: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2165:10: branch_false: following ‘false’ branch (when ‘i >= 0’)...
dnsmasq-2.91/src/dnsmasq.c:2165:20: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2165:11: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2168:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2168:10: branch_true: following ‘true’ branch (when ‘p != 0’)...
dnsmasq-2.91/src/dnsmasq.c:2170:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2171:14: branch_true: following ‘true’ branch (when ‘p == -1’)...
dnsmasq-2.91/src/dnsmasq.c:2174:15: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2174:15: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2174:15: danger: ‘pipefd[0]’ leaks here
# 2172|   	    {
# 2173|   	      /* fork() failed */
# 2174|-> 	      close(pipefd[0]);
# 2175|   	      return STAT_ABANDONED;
# 2176|   	    }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def69]
dnsmasq-2.91/src/dnsmasq.c:2192:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:2151:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2156:21: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2165:10: branch_false: following ‘false’ branch (when ‘i >= 0’)...
dnsmasq-2.91/src/dnsmasq.c:2165:20: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2165:11: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2168:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2168:10: branch_true: following ‘true’ branch (when ‘p != 0’)...
dnsmasq-2.91/src/dnsmasq.c:2170:11: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2171:14: branch_false: following ‘false’ branch (when ‘p != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2192:11: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2192:11: throw: if ‘read_write’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2192:11: danger: ‘pipefd[0]’ leaks here
# 2190|   	     is sent by the child after it has closed the
# 2191|   	     netlink socket. */
# 2192|-> 	  read_write(pipefd[0], &a, 1, RW_READ);
# 2193|   #endif
# 2194|   	  

Error: GCC_ANALYZER_WARNING (CWE-775): [#def70]
dnsmasq-2.91/src/dnsmasq.c:2213:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:2151:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2156:21: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2165:10: branch_false: following ‘false’ branch (when ‘i >= 0’)...
dnsmasq-2.91/src/dnsmasq.c:2165:20: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2165:11: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2168:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2168:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2213:23: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2213:11: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2213:11: danger: ‘pipefd[0]’ leaks here
# 2211|   #ifdef HAVE_LINUX_NETWORK
# 2212|   	  /* See comment above re: netlink socket. */
# 2213|-> 	  close(daemon->netlinkfd);
# 2214|   	  read_write(pipefd[1], &a, 1, RW_WRITE);
# 2215|   #endif		  

Error: GCC_ANALYZER_WARNING (CWE-775): [#def71]
dnsmasq-2.91/src/dnsmasq.c:2213:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
dnsmasq-2.91/src/dnsmasq.c:2151:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2156:21: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2165:10: branch_false: following ‘false’ branch (when ‘i >= 0’)...
dnsmasq-2.91/src/dnsmasq.c:2165:20: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2165:11: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2168:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2168:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2213:23: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2213:11: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2213:11: danger: ‘pipefd[1]’ leaks here
# 2211|   #ifdef HAVE_LINUX_NETWORK
# 2212|   	  /* See comment above re: netlink socket. */
# 2213|-> 	  close(daemon->netlinkfd);
# 2214|   	  read_write(pipefd[1], &a, 1, RW_WRITE);
# 2215|   #endif		  

Error: GCC_ANALYZER_WARNING (CWE-775): [#def72]
dnsmasq-2.91/src/dnsmasq.c:2214:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:2151:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2156:21: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2165:10: branch_false: following ‘false’ branch (when ‘i >= 0’)...
dnsmasq-2.91/src/dnsmasq.c:2165:20: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2165:11: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2168:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2168:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2213:23: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2214:11: throw: if ‘read_write’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2214:11: danger: ‘pipefd[0]’ leaks here
# 2212|   	  /* See comment above re: netlink socket. */
# 2213|   	  close(daemon->netlinkfd);
# 2214|-> 	  read_write(pipefd[1], &a, 1, RW_WRITE);
# 2215|   #endif		  
# 2216|   	  close(pipefd[0]); /* close read end in child. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def73]
dnsmasq-2.91/src/dnsmasq.c:2214:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
dnsmasq-2.91/src/dnsmasq.c:2151:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2156:21: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2165:10: branch_false: following ‘false’ branch (when ‘i >= 0’)...
dnsmasq-2.91/src/dnsmasq.c:2165:20: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2165:11: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2168:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2168:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2213:23: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2214:11: throw: if ‘read_write’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2214:11: danger: ‘pipefd[1]’ leaks here
# 2212|   	  /* See comment above re: netlink socket. */
# 2213|   	  close(daemon->netlinkfd);
# 2214|-> 	  read_write(pipefd[1], &a, 1, RW_WRITE);
# 2215|   #endif		  
# 2216|   	  close(pipefd[0]); /* close read end in child. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def74]
dnsmasq-2.91/src/dnsmasq.c:2216:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/dnsmasq.c:2151:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/dnsmasq.c:2156:21: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2165:10: branch_false: following ‘false’ branch (when ‘i >= 0’)...
dnsmasq-2.91/src/dnsmasq.c:2165:20: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2165:11: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/dnsmasq.c:2168:16: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2168:10: branch_false: following ‘false’ branch (when ‘p == 0’)...
dnsmasq-2.91/src/dnsmasq.c:2213:23: branch_false: ...to here
dnsmasq-2.91/src/dnsmasq.c:2216:11: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2216:11: danger: ‘pipefd[0]’ leaks here
# 2214|   	  read_write(pipefd[1], &a, 1, RW_WRITE);
# 2215|   #endif		  
# 2216|-> 	  close(pipefd[0]); /* close read end in child. */
# 2217|   	  daemon->pipe_to_parent = pipefd[1];	  
# 2218|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def75]
dnsmasq-2.91/src/dnsmasq.c:2268:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
dnsmasq-2.91/src/dnsmasq.c:2266:13: acquire_resource: socket created here
dnsmasq-2.91/src/dnsmasq.c:2266:6: branch_true: following ‘true’ branch (when ‘fd != -1’)...
dnsmasq-2.91/src/dnsmasq.c:2268:12: branch_true: ...to here
dnsmasq-2.91/src/dnsmasq.c:2268:12: throw: if ‘fix_fd’ throws an exception...
dnsmasq-2.91/src/dnsmasq.c:2268:12: danger: ‘fd’ leaks here
# 2266|     if ((fd = socket (AF_INET, SOCK_RAW, IPPROTO_ICMP)) != -1)
# 2267|       {
# 2268|->       if (!fix_fd(fd) ||
# 2269|   	  setsockopt(fd, SOL_SOCKET, SO_DONTROUTE, &zeroopt, sizeof(zeroopt)) == -1)
# 2270|   	{

Error: CPPCHECK_WARNING (CWE-457): [#def76]
dnsmasq-2.91/src/dnssec.c:163: warning[uninitvar]: Uninitialized variable: state->c
#  161|     int d;
#  162|     
#  163|->   if (state->op && state->c != 1)
#  164|       {
#  165|         state->op++;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def77]
dnsmasq-2.91/src/dnssec.c:1535:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘p’
dnsmasq-2.91/src/dnssec.c:1519:15: branch_false: following ‘false’ branch (when ‘i >= nsec_count’)...
dnsmasq-2.91/src/dnssec.c:1532:6: branch_false: ...to here
dnsmasq-2.91/src/dnssec.c:1532:6: branch_false: following ‘false’ branch (when ‘i != nsec_count’)...
dnsmasq-2.91/src/dnssec.c:1535:3: branch_false: ...to here
dnsmasq-2.91/src/dnssec.c:1535:3: danger: use of uninitialized value ‘p’ here
# 1533|       return DNSSEC_FAIL_NONSEC;
# 1534|   
# 1535|->   p++; /* flags */
# 1536|   
# 1537|     GETSHORT (iterations, p);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def78]
dnsmasq-2.91/src/edns0.c:297:12: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘encode[0]’
dnsmasq-2.91/src/edns0.c:546:8: enter_function: entry to ‘add_edns0_config’
dnsmasq-2.91/src/edns0.c:551:11: call_function: calling ‘add_mac’ from ‘add_edns0_config’
dnsmasq-2.91/src/edns0.c:551:11: return_function: returning to ‘add_edns0_config’ from ‘add_mac’
dnsmasq-2.91/src/edns0.c:552:10: call_function: calling ‘add_dns_client’ from ‘add_edns0_config’
#  295|   
#  296|     if (replace != 0 || maclen == 6)
#  297|->     plen = add_pseudoheader(header, plen, limit, EDNS0_OPTION_NOMDEVICEID, (unsigned char *)encode, strlen(encode), 0, replace);
#  298|   
#  299|     return plen;

Error: COMPILER_WARNING: [#def79]
dnsmasq-2.91/src/edns0.c: scope_hint: In function ‘add_umbrella_opt’
dnsmasq-2.91/src/edns0.c:512:30: warning[-Wunterminated-string-initialization]: initializer-string for array of ‘unsigned char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (5 chars into 4 available)
#  512 |   struct umbrella_opt opt = {{"ODNS"}, UMBRELLA_VERSION, 0, {0}};
#      |                              ^
#  510|     *cacheable = 0;
#  511|   
#  512|->   struct umbrella_opt opt = {{"ODNS"}, UMBRELLA_VERSION, 0, {0}};
#  513|     u8 *u = &opt.fields[0];
#  514|     int family = source->sa.sa_family;

Error: CPPCHECK_WARNING (CWE-457): [#def80]
dnsmasq-2.91/src/forward.c:1768: error[uninitvar]: Uninitialized variable: ifr
# 1766|         /* enforce available interface configuration */
# 1767|         
# 1768|->       if (!indextoname(listen->fd, if_index, ifr.ifr_name))
# 1769|   	return;
# 1770|         

Error: GCC_ANALYZER_WARNING (CWE-457): [#def81]
dnsmasq-2.91/src/forward.c:2708:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘last’
dnsmasq-2.91/src/forward.c:2384:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/forward.c:2442:10: branch_true: following ‘true’ branch (when ‘do_stale == 0’)...
dnsmasq-2.91/src/forward.c:2444:14: branch_true: ...to here
dnsmasq-2.91/src/forward.c:2444:14: branch_false: following ‘false’ branch (when ‘query_count <= 99’)...
dnsmasq-2.91/src/forward.c:2447:16: branch_false: ...to here
dnsmasq-2.91/src/forward.c:2447:14: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/forward.c:2448:24: branch_false: ...to here
dnsmasq-2.91/src/forward.c:2447:15: branch_false: following ‘false’ branch (when ‘size != 0’)...
dnsmasq-2.91/src/forward.c:2449:16: branch_false: ...to here
dnsmasq-2.91/src/forward.c:2447:15: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/forward.c:2452:14: branch_false: ...to here
dnsmasq-2.91/src/forward.c:2473:19: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/forward.c:2564:7: branch_true: ...to here
dnsmasq-2.91/src/forward.c:2702:10: branch_false: following ‘false’ branch (when ‘do_stale == 0’)...
dnsmasq-2.91/src/forward.c:2706:10: branch_false: ...to here
dnsmasq-2.91/src/forward.c:2706:10: branch_true: following ‘true’ branch (when ‘m == 0’)...
dnsmasq-2.91/src/forward.c:2708:21: branch_true: ...to here
dnsmasq-2.91/src/forward.c:2708:21: danger: use of uninitialized value ‘last’ here
# 2706|         if (m == 0)
# 2707|   	{
# 2708|-> 	  if (!(m = make_local_answer(flags, gotname, size, header, daemon->namebuff,
# 2709|   				      ((char *) header) + 65536, first, last, ede)))
# 2710|   	    break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def82]
dnsmasq-2.91/src/forward.c:2795:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
dnsmasq-2.91/src/forward.c:2778:13: acquire_resource: datagram socket created here
dnsmasq-2.91/src/forward.c:2778:6: branch_true: following ‘true’ branch (when ‘fd != -1’)...
dnsmasq-2.91/src/forward.c:2784:11: branch_true: ...to here
dnsmasq-2.91/src/forward.c:2784:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/forward.c:2795:11: branch_false: ...to here
dnsmasq-2.91/src/forward.c:2795:11: throw: if ‘local_bind’ throws an exception...
dnsmasq-2.91/src/forward.c:2795:11: danger: ‘fd’ leaks here
# 2793|   	}
# 2794|         
# 2795|->       if (local_bind(fd, &s->source_addr, s->interface, s->ifindex, 0))
# 2796|   	return fd;
# 2797|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def83]
dnsmasq-2.91/src/helper.c:88:30: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/helper.c:88:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:88:30: branch_false: ...to here
dnsmasq-2.91/src/helper.c:88:30: throw: if ‘fix_fd’ throws an exception...
dnsmasq-2.91/src/helper.c:88:30: danger: ‘pipefd[0]’ leaks here
#   86|     /* create the pipe through which the main program sends us commands,
#   87|        then fork our process. */
#   88|->   if (pipe(pipefd) == -1 || !fix_fd(pipefd[1]) || (pid = fork()) == -1)
#   89|       {
#   90|         send_event(err_fd, EVENT_PIPE_ERR, errno, NULL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def84]
dnsmasq-2.91/src/helper.c:88:30: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
dnsmasq-2.91/src/helper.c:88:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:88:30: branch_false: ...to here
dnsmasq-2.91/src/helper.c:88:30: throw: if ‘fix_fd’ throws an exception...
dnsmasq-2.91/src/helper.c:88:30: danger: ‘pipefd[1]’ leaks here
#   86|     /* create the pipe through which the main program sends us commands,
#   87|        then fork our process. */
#   88|->   if (pipe(pipefd) == -1 || !fix_fd(pipefd[1]) || (pid = fork()) == -1)
#   89|       {
#   90|         send_event(err_fd, EVENT_PIPE_ERR, errno, NULL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def85]
dnsmasq-2.91/src/helper.c:90:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/helper.c:88:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:88:30: branch_false: ...to here
dnsmasq-2.91/src/helper.c:90:7: throw: if ‘send_event’ throws an exception...
dnsmasq-2.91/src/helper.c:90:7: danger: ‘pipefd[0]’ leaks here
#   88|     if (pipe(pipefd) == -1 || !fix_fd(pipefd[1]) || (pid = fork()) == -1)
#   89|       {
#   90|->       send_event(err_fd, EVENT_PIPE_ERR, errno, NULL);
#   91|         _exit(0);
#   92|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def86]
dnsmasq-2.91/src/helper.c:96:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/helper.c:88:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:94:6: branch_true: following ‘true’ branch (when ‘pid != 0’)...
dnsmasq-2.91/src/helper.c:96:7: branch_true: ...to here
dnsmasq-2.91/src/helper.c:96:7: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/helper.c:96:7: danger: ‘pipefd[0]’ leaks here
#   94|     if (pid != 0)
#   95|       {
#   96|->       close(pipefd[0]); /* close reader side */
#   97|         return pipefd[1];
#   98|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def87]
dnsmasq-2.91/src/helper.c:118:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/helper.c:88:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:94:6: branch_false: following ‘false’ branch (when ‘pid == 0’)...
dnsmasq-2.91/src/helper.c:102:3: branch_false: ...to here
dnsmasq-2.91/src/helper.c:109:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/helper.c:116:14: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/helper.c:118:13: branch_true: ...to here
dnsmasq-2.91/src/helper.c:118:13: throw: if ‘send_event’ throws an exception...
dnsmasq-2.91/src/helper.c:118:13: danger: ‘pipefd[0]’ leaks here
#  116|   	  if (option_bool(OPT_NO_FORK))
#  117|   	    /* send error to daemon process if no-fork */
#  118|-> 	    send_event(event_fd, EVENT_USER_ERR, errno, daemon->scriptuser);
#  119|   	  else
#  120|   	    {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def88]
dnsmasq-2.91/src/helper.c:122:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/helper.c:88:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:94:6: branch_false: following ‘false’ branch (when ‘pid == 0’)...
dnsmasq-2.91/src/helper.c:102:3: branch_false: ...to here
dnsmasq-2.91/src/helper.c:109:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/helper.c:116:14: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:122:15: branch_false: ...to here
dnsmasq-2.91/src/helper.c:122:15: throw: if ‘send_event’ throws an exception...
dnsmasq-2.91/src/helper.c:122:15: danger: ‘pipefd[0]’ leaks here
#  120|   	    {
#  121|   	      /* kill daemon */
#  122|-> 	      send_event(event_fd, EVENT_DIE, 0, NULL);
#  123|   	      /* return error */
#  124|   	      send_event(err_fd, EVENT_USER_ERR, errno, daemon->scriptuser);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def89]
dnsmasq-2.91/src/helper.c:124:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/helper.c:88:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:94:6: branch_false: following ‘false’ branch (when ‘pid == 0’)...
dnsmasq-2.91/src/helper.c:102:3: branch_false: ...to here
dnsmasq-2.91/src/helper.c:109:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/helper.c:116:14: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:122:15: branch_false: ...to here
dnsmasq-2.91/src/helper.c:124:15: throw: if ‘send_event’ throws an exception...
dnsmasq-2.91/src/helper.c:124:15: danger: ‘pipefd[0]’ leaks here
#  122|   	      send_event(event_fd, EVENT_DIE, 0, NULL);
#  123|   	      /* return error */
#  124|-> 	      send_event(err_fd, EVENT_USER_ERR, errno, daemon->scriptuser);
#  125|   	    }
#  126|   	  _exit(0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def90]
dnsmasq-2.91/src/helper.c:134:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.91/src/helper.c:88:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:94:6: branch_false: following ‘false’ branch (when ‘pid == 0’)...
dnsmasq-2.91/src/helper.c:102:3: branch_false: ...to here
dnsmasq-2.91/src/helper.c:134:3: throw: if ‘close_fds’ throws an exception...
dnsmasq-2.91/src/helper.c:134:3: danger: ‘pipefd[0]’ leaks here
#  132|        Note that we have to do this before lua init
#  133|        so we don't close any lua fds. */
#  134|->   close_fds(max_fd, pipefd[0], event_fd, err_fd);
#  135|     
#  136|   #ifdef HAVE_LUASCRIPT

Error: GCC_ANALYZER_WARNING (CWE-457): [#def91]
dnsmasq-2.91/src/helper.c:516:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pipeout[0]’
dnsmasq-2.91/src/helper.c:88:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:94:6: branch_false: following ‘false’ branch (when ‘pid == 0’)...
dnsmasq-2.91/src/helper.c:102:3: branch_false: ...to here
dnsmasq-2.91/src/helper.c:178:6: branch_false: following ‘false’ branch (when ‘err_fd == -1’)...
dnsmasq-2.91/src/helper.c:178:6: branch_false: ...to here
dnsmasq-2.91/src/helper.c:192:10: branch_false: following ‘false’ branch (when ‘alloc_buff’ is NULL)...
dnsmasq-2.91/src/helper.c:199:12: branch_false: ...to here
dnsmasq-2.91/src/helper.c:199:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:212:16: branch_false: ...to here
dnsmasq-2.91/src/helper.c:246:10: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/helper.c:247:14: branch_true: ...to here
dnsmasq-2.91/src/helper.c:248:19: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:256:12: branch_false: ...to here
dnsmasq-2.91/src/helper.c:256:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:260:12: branch_false: ...to here
dnsmasq-2.91/src/helper.c:260:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:265:22: branch_false: ...to here
dnsmasq-2.91/src/helper.c:501:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:505:12: branch_false: ...to here
dnsmasq-2.91/src/helper.c:505:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:505:10: branch_false: ...to here
dnsmasq-2.91/src/helper.c:512:10: branch_true: following ‘true’ branch (when ‘pid == -1’)...
dnsmasq-2.91/src/helper.c:514:16: branch_true: ...to here
dnsmasq-2.91/src/helper.c:514:14: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/helper.c:516:15: branch_true: ...to here
dnsmasq-2.91/src/helper.c:516:15: danger: use of uninitialized value ‘pipeout[0]’ here
#  514|   	  if (!option_bool(OPT_DEBUG))
#  515|   	    {
#  516|-> 	      close(pipeout[0]);
#  517|   	      close(pipeout[1]);
#  518|   	    }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def92]
dnsmasq-2.91/src/helper.c:529:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pipeout[1]’
dnsmasq-2.91/src/helper.c:88:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:94:6: branch_false: following ‘false’ branch (when ‘pid == 0’)...
dnsmasq-2.91/src/helper.c:102:3: branch_false: ...to here
dnsmasq-2.91/src/helper.c:178:6: branch_false: following ‘false’ branch (when ‘err_fd == -1’)...
dnsmasq-2.91/src/helper.c:178:6: branch_false: ...to here
dnsmasq-2.91/src/helper.c:192:10: branch_false: following ‘false’ branch (when ‘alloc_buff’ is NULL)...
dnsmasq-2.91/src/helper.c:199:12: branch_false: ...to here
dnsmasq-2.91/src/helper.c:199:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:212:16: branch_false: ...to here
dnsmasq-2.91/src/helper.c:246:10: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/helper.c:247:14: branch_true: ...to here
dnsmasq-2.91/src/helper.c:248:19: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:256:12: branch_false: ...to here
dnsmasq-2.91/src/helper.c:256:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:260:12: branch_false: ...to here
dnsmasq-2.91/src/helper.c:260:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:265:22: branch_false: ...to here
dnsmasq-2.91/src/helper.c:501:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:505:12: branch_false: ...to here
dnsmasq-2.91/src/helper.c:505:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:505:10: branch_false: ...to here
dnsmasq-2.91/src/helper.c:512:10: branch_false: following ‘false’ branch (when ‘pid != -1’)...
dnsmasq-2.91/src/helper.c:523:10: branch_false: ...to here
dnsmasq-2.91/src/helper.c:523:10: branch_true: following ‘true’ branch (when ‘pid != 0’)...
dnsmasq-2.91/src/helper.c:525:16: branch_true: ...to here
dnsmasq-2.91/src/helper.c:525:14: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/helper.c:529:15: branch_true: ...to here
dnsmasq-2.91/src/helper.c:529:15: danger: use of uninitialized value ‘pipeout[1]’ here
#  527|   	      FILE *fp;
#  528|   	  
#  529|-> 	      close(pipeout[1]);
#  530|   	      
#  531|   	      /* Read lines sent to stdout/err by the script and pass them back to be logged */

Error: GCC_ANALYZER_WARNING (CWE-457): [#def93]
dnsmasq-2.91/src/helper.c:578:11: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pipeout[0]’
dnsmasq-2.91/src/helper.c:88:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:94:6: branch_false: following ‘false’ branch (when ‘pid == 0’)...
dnsmasq-2.91/src/helper.c:102:3: branch_false: ...to here
dnsmasq-2.91/src/helper.c:178:6: branch_false: following ‘false’ branch (when ‘err_fd == -1’)...
dnsmasq-2.91/src/helper.c:178:6: branch_false: ...to here
dnsmasq-2.91/src/helper.c:192:10: branch_false: following ‘false’ branch (when ‘alloc_buff’ is NULL)...
dnsmasq-2.91/src/helper.c:199:12: branch_false: ...to here
dnsmasq-2.91/src/helper.c:199:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:212:16: branch_false: ...to here
dnsmasq-2.91/src/helper.c:246:10: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/helper.c:247:14: branch_true: ...to here
dnsmasq-2.91/src/helper.c:248:19: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:256:12: branch_false: ...to here
dnsmasq-2.91/src/helper.c:256:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:260:12: branch_false: ...to here
dnsmasq-2.91/src/helper.c:260:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:265:22: branch_false: ...to here
dnsmasq-2.91/src/helper.c:501:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:505:12: branch_false: ...to here
dnsmasq-2.91/src/helper.c:505:10: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/helper.c:505:10: branch_false: ...to here
dnsmasq-2.91/src/helper.c:512:10: branch_false: following ‘false’ branch (when ‘pid != -1’)...
dnsmasq-2.91/src/helper.c:523:10: branch_false: ...to here
dnsmasq-2.91/src/helper.c:523:10: branch_false: following ‘false’ branch (when ‘pid == 0’)...
dnsmasq-2.91/src/helper.c:575:12: branch_false: ...to here
dnsmasq-2.91/src/helper.c:575:10: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/helper.c:578:11: branch_true: ...to here
dnsmasq-2.91/src/helper.c:578:11: danger: use of uninitialized value ‘pipeout[0]’ here
#  576|   	{
#  577|   	  /* map stdout/stderr of script to pipeout */
#  578|-> 	  close(pipeout[0]);
#  579|   	  dup2(pipeout[1], STDOUT_FILENO);
#  580|   	  dup2(pipeout[1], STDERR_FILENO);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
dnsmasq-2.91/src/inotify.c:205:22: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(*dd.dname)’
dnsmasq-2.91/src/inotify.c:167:35: branch_true: following ‘true’ branch (when ‘dd’ is non-NULL)...
dnsmasq-2.91/src/inotify.c:173:13: branch_true: ...to here
dnsmasq-2.91/src/inotify.c:198:43: acquire_memory: allocated here
dnsmasq-2.91/src/inotify.c:205:22: throw: if ‘readdir’ throws an exception...
dnsmasq-2.91/src/inotify.c:205:22: danger: ‘opendir(*dd.dname)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  203|   	 }
#  204|   
#  205|->        while ((ent = readdir(dir_stream)))
#  206|   	 {
#  207|   	   size_t lendir = strlen(dd->dname);

Error: CPPCHECK_WARNING (CWE-476): [#def95]
dnsmasq-2.91/src/lease.c:178: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: leasestream
#  176|   
#  177|         /* a+ mode leaves pointer at end. */
#  178|->       rewind(leasestream);
#  179|       }
#  180|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def96]
dnsmasq-2.91/src/log.c:359:7: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
dnsmasq-2.91/src/log.c:476:6: enter_function: entry to ‘die’
dnsmasq-2.91/src/log.c:488:3: call_function: calling ‘my_syslog’ from ‘die’
#  357|   	}
#  358|         va_start(ap, format);  
#  359|->       vsyslog(priority, format, ap);
#  360|         va_end(ap);
#  361|   #endif

Error: CPPCHECK_WARNING (CWE-457): [#def97]
dnsmasq-2.91/src/network.c:195: error[uninitvar]: Uninitialized variable: ifr
#  193|     struct irec *iface;
#  194|   
#  195|->   safe_strncpy(ifr.ifr_name, name, IF_NAMESIZE);
#  196|     if (ioctl(fd, SIOCGIFFLAGS, &ifr) != -1 &&
#  197|         ifr.ifr_flags & IFF_LOOPBACK)

Error: CPPCHECK_WARNING (CWE-457): [#def98]
dnsmasq-2.91/src/network.c:257: error[uninitvar]: Uninitialized variable: ifr
#  255|     (void)prefixlen;
#  256|   
#  257|->   if (!indextoname(param->fd, if_index, ifr.ifr_name) ||
#  258|         ioctl(param->fd, SIOCGIFFLAGS, &ifr) == -1)
#  259|       return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def99]
dnsmasq-2.91/src/network.c:764:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘param.fd’
dnsmasq-2.91/src/network.c:751:19: acquire_resource: datagram socket created here
dnsmasq-2.91/src/network.c:751:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/network.c:758:21: branch_false: ...to here
dnsmasq-2.91/src/network.c:758:32: branch_true: following ‘true’ branch (when ‘serv’ is non-NULL)...
dnsmasq-2.91/src/network.c:759:9: branch_true: ...to here
dnsmasq-2.91/src/network.c:759:8: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/network.c:764:36: branch_true: ...to here
dnsmasq-2.91/src/network.c:764:9: throw: if ‘safe_strncpy’ throws an exception...
dnsmasq-2.91/src/network.c:764:9: danger: ‘param.fd’ leaks here
#  762|   	struct ifreq ifr;
#  763|   	
#  764|-> 	safe_strncpy(ifr.ifr_name, serv->interface, IF_NAMESIZE);
#  765|   	if (ioctl(param.fd, SIOCGIFINDEX, &ifr) != -1) 
#  766|   	  serv->ifindex = ifr.ifr_ifindex;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def100]
dnsmasq-2.91/src/network.c:836:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘param.fd’
dnsmasq-2.91/src/network.c:751:19: acquire_resource: datagram socket created here
dnsmasq-2.91/src/network.c:751:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/network.c:758:21: branch_false: ...to here
dnsmasq-2.91/src/network.c:774:36: branch_false: following ‘false’ branch (when ‘iface’ is NULL)...
dnsmasq-2.91/src/network.c:778:8: branch_false: ...to here
dnsmasq-2.91/src/network.c:778:37: branch_false: following ‘false’ branch (when ‘intname’ is NULL)...
dnsmasq-2.91/src/network.c:791:8: branch_false: ...to here
dnsmasq-2.91/src/network.c:791:36: branch_false: following ‘false’ branch (when ‘cond’ is NULL)...
dnsmasq-2.91/src/network.c:804:8: branch_false: ...to here
dnsmasq-2.91/src/network.c:804:40: branch_false: following ‘false’ branch (when ‘addr’ is NULL)...
dnsmasq-2.91/src/network.c:810:3: branch_false: ...to here
dnsmasq-2.91/src/network.c:815:35: branch_false: following ‘false’ branch (when ‘zone’ is NULL)...
dnsmasq-2.91/src/network.c:834:3: branch_false: ...to here
dnsmasq-2.91/src/network.c:836:9: throw: if ‘iface_enumerate’ throws an exception...
dnsmasq-2.91/src/network.c:836:9: danger: ‘param.fd’ leaks here
#  834|     param.spare = spare;
#  835|     
#  836|->   ret = iface_enumerate(AF_INET6, &param, (callback_t){.af_inet6=iface_allowed_v6});
#  837|     if (ret < 0)
#  838|       goto again;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def101]
dnsmasq-2.91/src/network.c:913:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
dnsmasq-2.91/src/network.c:900:13: acquire_resource: socket created here
dnsmasq-2.91/src/network.c:900:6: branch_false: following ‘false’ branch (when ‘fd != -1’)...
dnsmasq-2.91/src/network.c:945:7: branch_false: ...to here
dnsmasq-2.91/src/network.c:945:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/network.c:951:6: branch_false: following ‘false’ branch (when ‘rc != -1’)...
dnsmasq-2.91/src/network.c:954:6: branch_false: ...to here
dnsmasq-2.91/src/network.c:954:6: branch_true: following ‘true’ branch (when ‘type == 1’)...
dnsmasq-2.91/src/network.c:957:11: branch_true: ...to here
dnsmasq-2.91/src/network.c:961:10: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/network.c:962:9: branch_true: ...to here
dnsmasq-2.91/src/network.c:913:14: throw: if ‘prettyprint_addr’ throws an exception...
dnsmasq-2.91/src/network.c:913:14: danger: ‘fd’ leaks here
#  911|       err:
#  912|         errsave = errno;
#  913|->       port = prettyprint_addr(addr, daemon->addrbuff);
#  914|         if (!option_bool(OPT_NOWILD) && !option_bool(OPT_CLEVERBIND))
#  915|   	sprintf(daemon->addrbuff, "port %d", port);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def102]
dnsmasq-2.91/src/network.c:919:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
dnsmasq-2.91/src/network.c:900:13: acquire_resource: socket created here
dnsmasq-2.91/src/network.c:900:6: branch_false: following ‘false’ branch (when ‘fd != -1’)...
dnsmasq-2.91/src/network.c:945:7: branch_false: ...to here
dnsmasq-2.91/src/network.c:945:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/network.c:951:6: branch_false: following ‘false’ branch (when ‘rc != -1’)...
dnsmasq-2.91/src/network.c:954:6: branch_false: ...to here
dnsmasq-2.91/src/network.c:954:6: branch_true: following ‘true’ branch (when ‘type == 1’)...
dnsmasq-2.91/src/network.c:957:11: branch_true: ...to here
dnsmasq-2.91/src/network.c:961:10: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/network.c:962:9: branch_true: ...to here
dnsmasq-2.91/src/network.c:918:10: branch_true: following ‘true’ branch (when ‘fd != -1’)...
dnsmasq-2.91/src/network.c:919:9: branch_true: ...to here
dnsmasq-2.91/src/network.c:919:9: throw: if ‘close’ throws an exception...
dnsmasq-2.91/src/network.c:919:9: danger: ‘fd’ leaks here
#  917|         
#  918|         if (fd != -1)
#  919|-> 	close (fd);
#  920|   	
#  921|         errno = errsave;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def103]
dnsmasq-2.91/src/network.c:1133:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘tcpfd’
dnsmasq-2.91/src/network.c:1177:6: enter_function: entry to ‘create_bound_listeners’
dnsmasq-2.91/src/network.c:1223:35: branch_true: following ‘true’ branch (when ‘if_tmp’ is non-NULL)...
dnsmasq-2.91/src/network.c:1224:11: branch_true: ...to here
dnsmasq-2.91/src/network.c:1225:16: call_function: calling ‘create_listeners’ from ‘create_bound_listeners’
# 1131|       }
# 1132|   
# 1133|->   return l;
# 1134|   }
# 1135|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def104]
dnsmasq-2.91/src/network.c:1740:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
dnsmasq-2.91/src/network.c:1734:13: acquire_resource: opened here
dnsmasq-2.91/src/network.c:1734:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/network.c:1740:3: branch_false: ...to here
dnsmasq-2.91/src/network.c:1740:3: throw: if ‘mark_servers’ throws an exception...
dnsmasq-2.91/src/network.c:1740:3: danger: ‘fopen(fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 1738|       }
# 1739|      
# 1740|->   mark_servers(SERV_FROM_RESOLV);
# 1741|       
# 1742|     while ((line = fgets(daemon->namebuff, MAXDNAME, f)))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
dnsmasq-2.91/src/network.c:1740:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
dnsmasq-2.91/src/network.c:1734:13: acquire_memory: allocated here
dnsmasq-2.91/src/network.c:1734:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/network.c:1740:3: branch_false: ...to here
dnsmasq-2.91/src/network.c:1740:3: throw: if ‘mark_servers’ throws an exception...
dnsmasq-2.91/src/network.c:1740:3: danger: ‘fopen(fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 1738|       }
# 1739|      
# 1740|->   mark_servers(SERV_FROM_RESOLV);
# 1741|       
# 1742|     while ((line = fgets(daemon->namebuff, MAXDNAME, f)))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def106]
dnsmasq-2.91/src/network.c:1742:30: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
dnsmasq-2.91/src/network.c:1734:13: acquire_resource: opened here
dnsmasq-2.91/src/network.c:1734:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/network.c:1740:3: branch_false: ...to here
dnsmasq-2.91/src/network.c:1742:10: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/network.c:1745:21: branch_true: ...to here
dnsmasq-2.91/src/network.c:1747:10: branch_false: following ‘false’ branch (when ‘token’ is non-NULL)...
dnsmasq-2.91/src/network.c:1749:11: branch_false: ...to here
dnsmasq-2.91/src/network.c:1751:10: branch_false: following ‘false’ branch (when ‘token’ is non-NULL)...
dnsmasq-2.91/src/network.c:1754:7: branch_false: ...to here
dnsmasq-2.91/src/network.c:1757:10: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/network.c:1762:39: branch_true: ...to here
dnsmasq-2.91/src/network.c:1795:7: throw: if ‘add_update_server’ throws an exception...
dnsmasq-2.91/src/network.c:1742:30: danger: ‘fopen(fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
# 1740|     mark_servers(SERV_FROM_RESOLV);
# 1741|       
# 1742|->   while ((line = fgets(daemon->namebuff, MAXDNAME, f)))
# 1743|       {
# 1744|         union mysockaddr addr, source_addr;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
dnsmasq-2.91/src/network.c:1742:30: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
dnsmasq-2.91/src/network.c:1734:13: acquire_memory: allocated here
dnsmasq-2.91/src/network.c:1734:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/network.c:1740:3: branch_false: ...to here
dnsmasq-2.91/src/network.c:1742:10: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/network.c:1745:21: branch_true: ...to here
dnsmasq-2.91/src/network.c:1747:10: branch_false: following ‘false’ branch (when ‘token’ is non-NULL)...
dnsmasq-2.91/src/network.c:1749:11: branch_false: ...to here
dnsmasq-2.91/src/network.c:1751:10: branch_false: following ‘false’ branch (when ‘token’ is non-NULL)...
dnsmasq-2.91/src/network.c:1754:7: branch_false: ...to here
dnsmasq-2.91/src/network.c:1757:10: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/network.c:1762:39: branch_true: ...to here
dnsmasq-2.91/src/network.c:1795:7: throw: if ‘add_update_server’ throws an exception...
dnsmasq-2.91/src/network.c:1742:30: danger: ‘fopen(fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
# 1740|     mark_servers(SERV_FROM_RESOLV);
# 1741|       
# 1742|->   while ((line = fgets(daemon->namebuff, MAXDNAME, f)))
# 1743|       {
# 1744|         union mysockaddr addr, source_addr;

Error: GCC_ANALYZER_WARNING (CWE-121): [#def108]
dnsmasq-2.91/src/option.c:857:7: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
dnsmasq-2.91/src/option.c:5886:6: enter_function: entry to ‘read_opts’
dnsmasq-2.91/src/option.c:5947:10: branch_false: following ‘false’ branch (when ‘option != -1’)...
dnsmasq-2.91/src/option.c:5960:11: branch_false: ...to here
dnsmasq-2.91/src/option.c:5988:13: call_function: calling ‘do_usage’ from ‘read_opts’
#  855|   	sprintf(buff, "    ");
#  856|         
#  857|->       sprintf(buff+4, "--%s%s%s", opts[j].name, eq, desc);
#  858|         printf("%-55.55s", buff);
#  859|   	     

Error: GCC_ANALYZER_WARNING (CWE-404): [#def109]
dnsmasq-2.91/src/rfc1035.c:1468:25: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
dnsmasq-2.91/src/rfc1035.c:1455:3: acquire_resource: ‘va_start’ called here
dnsmasq-2.91/src/rfc1035.c:1460:6: branch_false: following ‘false’ branch (when ‘nameoffset <= 0’)...
dnsmasq-2.91/src/rfc1035.c:1467:13: branch_false: ...to here
dnsmasq-2.91/src/rfc1035.c:1468:10: branch_true: following ‘true’ branch (when ‘name’ is non-NULL)...
dnsmasq-2.91/src/rfc1035.c:1468:25: branch_true: ...to here
dnsmasq-2.91/src/rfc1035.c:1468:25: throw: if ‘do_rfc1035_name’ throws an exception...
dnsmasq-2.91/src/rfc1035.c:1468:25: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 1466|       {
# 1467|         char *name = va_arg(ap, char *);
# 1468|->       if (name && !(p = do_rfc1035_name(p, name, limit)))
# 1469|   	goto truncated;
# 1470|         

Error: CPPCHECK_WARNING (CWE-562): [#def110]
dnsmasq-2.91/src/rfc3315.c:247: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  245|   	      /* the packet data is unaligned, copy to aligned storage */
#  246|   	      memcpy(&align, inbuff + 2, IN6ADDRSZ); 
#  247|-> 	      state->link_address = &align;
#  248|   	      /* zero is_unicast since that is now known to refer to the 
#  249|   		 relayed packet, not the original sent by the client */

Error: CPPCHECK_WARNING (CWE-562): [#def111]
dnsmasq-2.91/src/rfc3315.c:297: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  295|     v6_id.net = "dhcpv6";
#  296|     v6_id.next = state->tags;
#  297|->   state->tags = &v6_id;
#  298|   
#  299|     start_msg = save_counter(-1);

Error: CPPCHECK_WARNING (CWE-562): [#def112]
dnsmasq-2.91/src/rfc3315.c:590: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  588|         known_id.net = "known";
#  589|         known_id.next = state->tags;
#  590|->       state->tags = &known_id;
#  591|   
#  592|         if (have_config(config, CONFIG_DISABLE))

Error: CPPCHECK_WARNING (CWE-562): [#def113]
dnsmasq-2.91/src/rfc3315.c:601: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  599|         known_id.net = "known-othernet";
#  600|         known_id.next = state->tags;
#  601|->       state->tags = &known_id;
#  602|       }
#  603|     

Error: GCC_ANALYZER_WARNING (CWE-775): [#def114]
dnsmasq-2.91/src/tftp.c:332:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor
dnsmasq-2.91/src/tftp.c:586:6: enter_function: entry to ‘check_tftp_listeners’
dnsmasq-2.91/src/tftp.c:591:38: branch_true: following ‘true’ branch (when ‘listener’ is non-NULL)...
dnsmasq-2.91/src/tftp.c:592:9: branch_true: ...to here
dnsmasq-2.91/src/tftp.c:592:8: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/tftp.c:593:7: call_function: calling ‘tftp_request’ from ‘check_tftp_listeners’
#  330|     transfer->netascii = transfer->carrylf = 0;
#  331|    
#  332|->   (void)prettyprint_addr(&peer, daemon->addrbuff);
#  333|     
#  334|     /* if we have a nailed-down range, iterate until we find a free one. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def115]
dnsmasq-2.91/src/util.c:780:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’
dnsmasq-2.91/src/util.c:44:6: enter_function: entry to ‘rand_init’
dnsmasq-2.91/src/util.c:46:12: acquire_resource: opened here
dnsmasq-2.91/src/util.c:48:6: branch_false: following ‘false’ branch...
dnsmasq-2.91/src/util.c:49:8: branch_false: ...to here
dnsmasq-2.91/src/util.c:49:8: call_function: calling ‘read_write’ from ‘rand_init’
dnsmasq-2.91/src/util.c:49:8: return_function: returning to ‘rand_init’ from ‘read_write’
dnsmasq-2.91/src/util.c:780:18: danger: ‘open("/dev/urandom", 0)’ leaks here; was opened at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1)
#  778|     ssize_t n, done;
#  779|     
#  780|->   for (done = 0; done < size; done += n)
#  781|       {
#  782|         if (rw & 1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def116]
dnsmasq-2.91/src/util.c:840:20: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/proc/self/fd")’
dnsmasq-2.91/src/util.c:836:12: acquire_memory: allocated here
dnsmasq-2.91/src/util.c:836:6: branch_true: following ‘true’ branch...
dnsmasq-2.91/src/util.c:836:6: branch_true: ...to here
dnsmasq-2.91/src/util.c:840:20: throw: if ‘readdir’ throws an exception...
dnsmasq-2.91/src/util.c:840:20: danger: ‘opendir("/proc/self/fd")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  838|         struct dirent *de;
#  839|   
#  840|->       while ((de = readdir(d)))
#  841|   	{
#  842|   	  long fd;

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
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-99.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-x86_64
project-namednsmasq-2.91-1.fc44
store-results-to/tmp/tmpfuiv5rid/dnsmasq-2.91-1.fc44.tar.xz
time-created2026-01-08 15:51:54
time-finished2026-01-08 15:54:16
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpfuiv5rid/dnsmasq-2.91-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpfuiv5rid/dnsmasq-2.91-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9