Task #90373 - fixed.err

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

Error: GCC_ANALYZER_WARNING (CWE-775):
dnsmasq-2.90/src/dnsmasq.c:1982:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.90/src/dnsmasq.c:2138:5: enter_function: entry to ‘delay_dhcp’
dnsmasq-2.90/src/dnsmasq.c:2161:8: branch_true: following ‘true’ branch...
dnsmasq-2.90/src/dnsmasq.c:2188:10: branch_true: following ‘true’ branch...
dnsmasq-2.90/src/dnsmasq.c:2189:9: branch_true: ...to here
dnsmasq-2.90/src/dnsmasq.c:2189:9: call_function: calling ‘check_dns_listeners’ from ‘delay_dhcp’
# 1980|   		  
# 1981|   		  unsigned char a;
# 1982|-> 		  read_write(pipefd[0], &a, 1, 1);
# 1983|   #endif
# 1984|   

Error: GCC_ANALYZER_WARNING (CWE-775):
dnsmasq-2.90/src/dnsmasq.c:2025:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
dnsmasq-2.90/src/dnsmasq.c:2138:5: enter_function: entry to ‘delay_dhcp’
dnsmasq-2.90/src/dnsmasq.c:2161:8: branch_true: following ‘true’ branch...
dnsmasq-2.90/src/dnsmasq.c:2188:10: branch_true: following ‘true’ branch...
dnsmasq-2.90/src/dnsmasq.c:2189:9: branch_true: ...to here
dnsmasq-2.90/src/dnsmasq.c:2189:9: call_function: calling ‘check_dns_listeners’ from ‘delay_dhcp’
# 2023|   
# 2024|   		  close(daemon->netlinkfd);
# 2025|-> 		  read_write(pipefd[1], &a, 1, 0);
# 2026|   #endif		  
# 2027|   		  alarm(CHILD_LIFETIME);

Error: GCC_ANALYZER_WARNING (CWE-775):
dnsmasq-2.90/src/dnsmasq.c:2025:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
dnsmasq-2.90/src/dnsmasq.c:2138:5: enter_function: entry to ‘delay_dhcp’
dnsmasq-2.90/src/dnsmasq.c:2161:8: branch_true: following ‘true’ branch...
dnsmasq-2.90/src/dnsmasq.c:2188:10: branch_true: following ‘true’ branch...
dnsmasq-2.90/src/dnsmasq.c:2189:9: branch_true: ...to here
dnsmasq-2.90/src/dnsmasq.c:2189:9: call_function: calling ‘check_dns_listeners’ from ‘delay_dhcp’
# 2023|   
# 2024|   		  close(daemon->netlinkfd);
# 2025|-> 		  read_write(pipefd[1], &a, 1, 0);
# 2026|   #endif		  
# 2027|   		  alarm(CHILD_LIFETIME);

Error: GCC_ANALYZER_WARNING (CWE-775):
dnsmasq-2.90/src/dnsmasq.c:2025:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[auth_dns]’
dnsmasq-2.90/src/dnsmasq.c:2138:5: enter_function: entry to ‘delay_dhcp’
dnsmasq-2.90/src/dnsmasq.c:2161:8: branch_true: following ‘true’ branch...
dnsmasq-2.90/src/dnsmasq.c:2188:10: branch_true: following ‘true’ branch...
dnsmasq-2.90/src/dnsmasq.c:2189:9: branch_true: ...to here
dnsmasq-2.90/src/dnsmasq.c:2189:9: call_function: calling ‘check_dns_listeners’ from ‘delay_dhcp’
# 2023|   
# 2024|   		  close(daemon->netlinkfd);
# 2025|-> 		  read_write(pipefd[1], &a, 1, 0);
# 2026|   #endif		  
# 2027|   		  alarm(CHILD_LIFETIME);

Error: GCC_ANALYZER_WARNING (CWE-457):
dnsmasq-2.90/src/dnsmasq.c:2025:19: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pipefd[1]’
dnsmasq-2.90/src/dnsmasq.c:2138:5: enter_function: entry to ‘delay_dhcp’
dnsmasq-2.90/src/dnsmasq.c:2161:8: branch_true: following ‘true’ branch...
dnsmasq-2.90/src/dnsmasq.c:2188:10: branch_true: following ‘true’ branch...
dnsmasq-2.90/src/dnsmasq.c:2189:9: branch_true: ...to here
dnsmasq-2.90/src/dnsmasq.c:2189:9: call_function: calling ‘check_dns_listeners’ from ‘delay_dhcp’
# 2023|   
# 2024|   		  close(daemon->netlinkfd);
# 2025|-> 		  read_write(pipefd[1], &a, 1, 0);
# 2026|   #endif		  
# 2027|   		  alarm(CHILD_LIFETIME);

Error: GCC_ANALYZER_WARNING (CWE-404):
dnsmasq-2.90/src/rfc1035.c:1477:19: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
dnsmasq-2.90/src/rfc1035.c:1400:3: acquire_resource: ‘va_start’ called here
dnsmasq-2.90/src/rfc1035.c:1405:6: branch_true: following ‘true’ branch (when ‘nameoffset > 0’)...
dnsmasq-2.90/src/rfc1035.c:1407:7: branch_true: ...to here
dnsmasq-2.90/src/rfc1035.c:1438:10: branch_true: following ‘true’ branch...
dnsmasq-2.90/src/rfc1035.c:1439:5: branch_true: ...to here
dnsmasq-2.90/src/rfc1035.c:1475:12: branch_false: following ‘false’ branch (when ‘offset’ is NULL)...
dnsmasq-2.90/src/rfc1035.c:1477:19: branch_false: ...to here
dnsmasq-2.90/src/rfc1035.c:1477:19: throw: if ‘do_rfc1035_name’ throws an exception...
dnsmasq-2.90/src/rfc1035.c:1477:19: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 1475|           if (offset)
# 1476|             *offset = p - (unsigned char *)header;
# 1477|->         if (!(p = do_rfc1035_name(p, va_arg(ap, char *), limit)))
# 1478|   	  goto truncated;
# 1479|   	CHECK_LIMIT(1);