Task #1625 - libupnp-1.14.18-3.fc40/scan-results.err
back to task #1625download
Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/ixml/src/document.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/ixml/src/element.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/ixml/src/ixmlparser.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/ixml/src/node.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/sample/common/tv_ctrlpt.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/sample/common/tv_device.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-401): libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/api/UpnpString.c:91: error[memleak]: Memory leak: p.m_string # 89| } # 90| # 91|-> return (UpnpString *)p; # 92| # 93| /*free(p->m_string); */ Error: CPPCHECK_WARNING (CWE-401): libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/api/UpnpString.c:127: error[memleak]: Memory leak: q.m_string # 125| } # 126| # 127|-> return (UpnpString *)q; # 128| # 129| /*free(q->m_string); */ Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/api/upnpapi.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/api/upnpapi.c:3369:3: warning[deadcode.DeadStores]: Value stored to 'status' is never read # 3367| int status = http_EndHttpRequest(handle, timeout); # 3368| if (status == UPNP_E_SUCCESS) { # 3369|-> status = http_GetHttpResponse( # 3370| handle, NULL, NULL, NULL, httpStatus, timeout); # 3371| } Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/api/upnptools.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/gena/gena_ctrlpt.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/gena/gena_device.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-401): libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/gena/gena_device.c:657:16: warning[-Wanalyzer-malloc-leak]: leak of 'UDN_copy' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/upnpapi.h:142:9: note: in expansion of macro 'ithread_rwlock_wrlock' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/upnpapi.h:137:22: note: in expansion of macro 'HandleWriteLock' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/gena/gena_device.c:549:9: note: in expansion of macro 'HandleLock' # 655| ret); # 656| # 657|-> return ret; # 658| } # 659| Error: GCC_ANALYZER_WARNING (CWE-401): libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/gena/gena_device.c: scope_hint: In function 'genaInitNotifyCommon' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/gena/gena_device.c:657:16: warning[-Wanalyzer-malloc-leak]: leak of 'servId_copy' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/threadutil/FreeList.h:43: included_from: Included from here. libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/threadutil/LinkedList.h:39: included_from: Included from here. libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/httpparser.h:40: included_from: Included from here. libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/gena_device.h:39: included_from: Included from here. libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/gena/gena_device.c:39: included_from: Included from here. libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/upnpapi.h:142:9: note: in expansion of macro 'ithread_rwlock_wrlock' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/upnpapi.h:137:22: note: in expansion of macro 'HandleWriteLock' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/gena/gena_device.c:549:9: note: in expansion of macro 'HandleLock' # 655| ret); # 656| # 657|-> return ret; # 658| } # 659| Error: GCC_ANALYZER_WARNING (CWE-401): libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/gena/gena_device.c: scope_hint: In function 'genaNotifyAllCommon' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/gena/gena_device.c:958:16: warning[-Wanalyzer-malloc-leak]: leak of 'UDN_copy' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/upnpapi.h:142:9: note: in expansion of macro 'ithread_rwlock_wrlock' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/upnpapi.h:137:22: note: in expansion of macro 'HandleWriteLock' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/gena/gena_device.c:856:9: note: in expansion of macro 'HandleLock' # 956| ret); # 957| # 958|-> return ret; # 959| } # 960| Error: GCC_ANALYZER_WARNING (CWE-401): libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/gena/gena_device.c:958:16: warning[-Wanalyzer-malloc-leak]: leak of 'reference_count' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/upnpapi.h:142:9: note: in expansion of macro 'ithread_rwlock_wrlock' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/upnpapi.h:137:22: note: in expansion of macro 'HandleWriteLock' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/gena/gena_device.c:856:9: note: in expansion of macro 'HandleLock' # 956| ret); # 957| # 958|-> return ret; # 959| } # 960| Error: GCC_ANALYZER_WARNING (CWE-401): libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/gena/gena_device.c:958:16: warning[-Wanalyzer-malloc-leak]: leak of 'servId_copy' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/upnpapi.h:142:9: note: in expansion of macro 'ithread_rwlock_wrlock' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/upnpapi.h:137:22: note: in expansion of macro 'HandleWriteLock' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/gena/gena_device.c:856:9: note: in expansion of macro 'HandleLock' # 956| ret); # 957| # 958|-> return ret; # 959| } # 960| Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/miniserver/miniserver.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: COMPILER_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/miniserver/miniserver.c: scope_hint: In function 'handle_request' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/miniserver/miniserver.c:204:54: warning[-Wformat-truncation=]: ']:' directive output may be truncated writing 2 bytes into a region of size between 0 and 255 # 204 | n = snprintf(host_port, hp_size, "[%s]:%d", host, port); # | ^~ libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/miniserver/miniserver.c:204:50: note: directive argument in the range [0, 65535] # 204 | n = snprintf(host_port, hp_size, "[%s]:%d", host, port); # | ^~~~~~~~~ /usr/include/bits/stdio2.h:68:10: note: '__snprintf_chk' output between 5 and 264 bytes into a destination of size 256 # 68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 69 | __glibc_objsize (__s), __fmt, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 70 | __va_arg_pack ()); # | ~~~~~~~~~~~~~~~~~ # 202| } # 203| port = ntohs(addr6->sin6_port); # 204|-> n = snprintf(host_port, hp_size, "[%s]:%d", host, port); # 205| break; # 206| case AF_INET: Error: COMPILER_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/miniserver/miniserver.c: scope_hint: In function 'handle_request' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/miniserver/miniserver.c:214:54: warning[-Wformat-truncation=]: '%d' directive output may be truncated writing between 1 and 5 bytes into a region of size between 0 and 255 # 214 | n = snprintf(host_port, hp_size, "%s:%d", host, port); # | ^~ libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/miniserver/miniserver.c:214:50: note: directive argument in the range [0, 65535] # 214 | n = snprintf(host_port, hp_size, "%s:%d", host, port); # | ^~~~~~~ /usr/include/bits/stdio2.h:68:10: note: '__snprintf_chk' output between 3 and 262 bytes into a destination of size 256 # 68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 69 | __glibc_objsize (__s), __fmt, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 70 | __va_arg_pack ()); # | ~~~~~~~~~~~~~~~~~ # 212| } # 213| port = ntohs(addr4->sin_port); # 214|-> n = snprintf(host_port, hp_size, "%s:%d", host, port); # 215| break; # 216| } Error: COMPILER_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/miniserver/miniserver.c: scope_hint: In function 'handle_request' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/miniserver/miniserver.c:329:33: warning[-Wformat-truncation=]: '%s' directive output may be truncated writing up to 255 bytes into a region of size 206 # 329 | "HTTP/1.1 307 Temporary Redirect\r\n" # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #...... # 337 | snprintf(redir_str, NAME_SIZE, redir_fmt, host_port); # | ~~~~~~~~~ libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/miniserver/miniserver.c:330:51: note: format string is defined here # 330 | "Location: http://%s\r\n\r\n"; # | ^~ /usr/include/bits/stdio2.h:68:10: note: '__snprintf_chk' output between 55 and 310 bytes into a destination of size 256 # 68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 69 | __glibc_objsize (__s), __fmt, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 70 | __va_arg_pack ()); # | ~~~~~~~~~~~~~~~~~ # 327| membuffer redir_buf; # 328| static const char *redir_fmt = # 329|-> "HTTP/1.1 307 Temporary Redirect\r\n" # 330| "Location: http://%s\r\n\r\n"; # 331| char redir_str[NAME_SIZE]; Error: GCC_ANALYZER_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/miniserver/miniserver.c: scope_hint: In function 'do_bind' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/miniserver/miniserver.c:877:30: warning[-Wanalyzer-fd-use-without-check]: 'bind' on possibly invalid file descriptor 'ss4.fd' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/upnputil.h:40: included_from: Included from here. libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/membuffer.h:40: included_from: Included from here. libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/httpparser.h:41: included_from: Included from here. libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/miniserver.h:40: included_from: Included from here. libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/miniserver/miniserver.c:50: included_from: Included from here. libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/miniserver/miniserver.c:906:16: note: in expansion of macro 'UPNP_E_SUCCESS' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/threadutil/FreeList.h:45: included_from: Included from here. libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/threadutil/LinkedList.h:39: included_from: Included from here. libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/httpparser.h:40: included_from: Included from here. # 875| break; # 876| } # 877|-> bind_error = bind(s->fd, s->serverAddr, s->address_len); # 878| if (bind_error == SOCKET_ERROR) { # 879| #ifdef _WIN32 Error: GCC_ANALYZER_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/miniserver/miniserver.c:877:30: warning[-Wanalyzer-fd-use-without-check]: 'bind' on possibly invalid file descriptor 'ss6.fd' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/miniserver/miniserver.c:906:16: note: in expansion of macro 'UPNP_E_SUCCESS' # 875| break; # 876| } # 877|-> bind_error = bind(s->fd, s->serverAddr, s->address_len); # 878| if (bind_error == SOCKET_ERROR) { # 879| #ifdef _WIN32 Error: GCC_ANALYZER_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/miniserver/miniserver.c:877:30: warning[-Wanalyzer-fd-use-without-check]: 'bind' on possibly invalid file descriptor 'ss6UlaGua.fd' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/miniserver/miniserver.c:906:16: note: in expansion of macro 'UPNP_E_SUCCESS' # 875| break; # 876| } # 877|-> bind_error = bind(s->fd, s->serverAddr, s->address_len); # 878| if (bind_error == SOCKET_ERROR) { # 879| #ifdef _WIN32 Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/net/http/httpparser.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/net/http/httpparser.c:289:6: warning[deadcode.DeadStores]: Value stored to 'c' is never read # 287| } else if (c == '\\') { # 288| if (cursor < null_terminator) { # 289|-> c = *cursor++; # 290| /* the char after '\\' could be ANY # 291| * octet */ Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/net/http/httpreadwrite.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/net/http/httpreadwrite.c:606:7: warning[deadcode.DeadStores]: Value stored to 'nw' is never read # 604| if (Instr && Instr->IsChunkActive) { # 605| const char *str = "0\r\n\r\n"; # 606|-> nw = sock_write(info, # 607| str, # 608| strlen(str), Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/net/http/statcodes.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/net/http/webserver.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-126): libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/net/http/webserver.c: scope_hint: In function 'CheckOtherHTTPHeaders' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/net/http/webserver.c:1024:41: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/net/http/webserver.c:1024:41: note: read of 19 bytes from after the end of the region # └──────────────────────────────────────────────────────────────────────┘ # ^ ^ # 1022| sizeof(RespInstr->AcceptLanguageHeader) - # 1023| 1; # 1024|-> memcpy(RespInstr->AcceptLanguageHeader, # 1025| TmpBuf, # 1026| length); Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/net/uri/uri.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-465): libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/net/uri/uri.c: scope_hint: In function 'parse_hostport' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/net/uri/uri.c:366:20: warning[-Wanalyzer-deref-before-check]: check of 'last_dot' for NULL after already dereferencing it libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/uri.h:46: included_from: Included from here. libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/service_table.h:49: included_from: Included from here. libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/client_table.h:16: included_from: Included from here. libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/inc/upnpapi.h:41: included_from: Included from here. libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/net/uri/uri.c:53: included_from: Included from here. # 364| if (has_port == 1) # 365| c++; # 366|-> if (last_dot != NULL && isdigit(*(last_dot + 1))) # 367| /* Must be an IPv4 address. */ # 368| af = AF_INET; Error: CLANG_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/net/uri/uri.c:717:2: warning[deadcode.DeadStores]: Value stored to 'len' is never read # 715| goto error; # 716| out_finger += rv; # 717|-> len -= (size_t)rv; # 718| # 719| if (remove_dots(path, (size_t)(out_finger - path)) != UPNP_E_SUCCESS) Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/genlib/service_table/service_table.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-457): libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/soap/soap_ctrlpt.c:901: error[uninitvar]: Uninitialized variable: &host # 899| membuffer_init(&request); # 900| /* get host hdr and url path */ # 901|-> if (get_host_and_path(action_url, &host, &path, &url) == -1) { # 902| return UPNP_E_INVALID_URL; # 903| } Error: CPPCHECK_WARNING (CWE-457): libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/soap/soap_ctrlpt.c:901: error[uninitvar]: Uninitialized variable: &path # 899| membuffer_init(&request); # 900| /* get host hdr and url path */ # 901|-> if (get_host_and_path(action_url, &host, &path, &url) == -1) { # 902| return UPNP_E_INVALID_URL; # 903| } Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/ssdp/ssdp_ctrlpt.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/ssdp/ssdp_ctrlpt.c:274:4: warning[deadcode.DeadStores]: Value stored to 'ctrlpt_cookie' is never read # 272| /* copy */ # 273| ctrlpt_callback = ctrlpt_info->Callback; # 274|-> ctrlpt_cookie = ctrlpt_info->Cookie; # 275| # 276| node = ListHead(&ctrlpt_info->SsdpSearchList); Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/ssdp/ssdp_device.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/ssdp/ssdp_server.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-775): libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/ssdp/ssdp_server.c: scope_hint: In function 'create_ssdp_sock_v4' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/ssdp/ssdp_server.c:975:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*ssdpSock' # 973| ssdpAddr4->sin_port = htons(SSDP_PORT); # 974| ret = bind(*ssdpSock, (struct sockaddr *)ssdpAddr4, sizeof(*ssdpAddr4)); # 975|-> if (ret == -1) { # 976| strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN); # 977| UpnpPrintf(UPNP_CRITICAL, Error: GCC_ANALYZER_WARNING (CWE-775): libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/ssdp/ssdp_server.c:1004:46: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*out.ssdpSock4' # 1002| inet_pton(AF_INET, (PCSTR)SSDP_IP, &ssdpMcastAddr.imr_multiaddr); # 1003| #else # 1004|-> ssdpMcastAddr.imr_interface.s_addr = inet_addr(gIF_IPV4); # 1005| /* ssdpMcastAddr.imr_address.s_addr = inet_addr(gIF_IPV4); */ # 1006| ssdpMcastAddr.imr_multiaddr.s_addr = inet_addr(SSDP_IP); Error: GCC_ANALYZER_WARNING (CWE-775): libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/ssdp/ssdp_server.c: scope_hint: In function 'create_ssdp_sock_v6' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/ssdp/ssdp_server.c:1199:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*ssdpSock' # 1197| ssdpAddr6->sin6_port = htons(SSDP_PORT); # 1198| ret = bind(*ssdpSock, (struct sockaddr *)ssdpAddr6, sizeof(*ssdpAddr6)); # 1199|-> if (ret == -1) { # 1200| #ifndef _WIN32 # 1201| strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN); Error: GCC_ANALYZER_WARNING (CWE-775): libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/ssdp/ssdp_server.c:1230:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*out.ssdpSock6' # 1228| memset((void *)&ssdpMcastAddr, 0, sizeof(ssdpMcastAddr)); # 1229| ssdpMcastAddr.ipv6mr_interface = gIF_INDEX; # 1230|-> inet_pton( # 1231| AF_INET6, SSDP_IPV6_LINKLOCAL, &ssdpMcastAddr.ipv6mr_multiaddr); # 1232| ret = setsockopt(*ssdpSock, Error: GCC_ANALYZER_WARNING (CWE-775): libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/ssdp/ssdp_server.c: scope_hint: In function 'create_ssdp_sock_v6_ula_gua' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/ssdp/ssdp_server.c:1377:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*ssdpSock' # 1375| ssdpAddr6->sin6_port = htons(SSDP_PORT); # 1376| ret = bind(*ssdpSock, (struct sockaddr *)ssdpAddr6, sizeof(*ssdpAddr6)); # 1377|-> if (ret == -1) { # 1378| strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN); # 1379| UpnpPrintf(UPNP_CRITICAL, Error: GCC_ANALYZER_WARNING (CWE-775): libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/ssdp/ssdp_server.c:1393:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*out.ssdpSock6UlaGua' # 1391| ssdpMcastAddr.ipv6mr_interface = gIF_INDEX; # 1392| /* SITE LOCAL */ # 1393|-> inet_pton( # 1394| AF_INET6, SSDP_IPV6_SITELOCAL, &ssdpMcastAddr.ipv6mr_multiaddr); # 1395| ret = setsockopt(*ssdpSock, Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/threadutil/ThreadPool.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/threadutil/TimerThread.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/urlconfig/urlconfig.c:142:13: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 140| # 141| /* add / suffix, if missing */ # 142|-> root_len = strlen(rootPath); # 143| if (root_len == 0 || rootPath[root_len - 1] != '/') # 144| temp_str = "/"; Error: COMPILER_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/urlconfig/urlconfig.c: scope_hint: In function 'configure_urlbase' libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/urlconfig/urlconfig.c:199:35: warning[-Wformat-truncation=]: '%s' directive output may be truncated writing up to 179 bytes into a region of size 173 # 199 | snprintf(descURL, len, "%s%s%s", http_scheme, ipPortStr, alias); # | ^~ #...... # 405 | err_code = calc_descURL(ipaddr_port, new_alias, docURL); # | ~~~~~~~~~~~ /usr/include/bits/stdio2.h:68:10: note: '__snprintf_chk' output 8 or more bytes (assuming 187) into a destination of size 180 # 68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 69 | __glibc_objsize (__s), __fmt, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 70 | __va_arg_pack ()); # | ~~~~~~~~~~~~~~~~~ # 197| if (len > (size_t)LINE_SIZE) # 198| return UPNP_E_URL_TOO_BIG; # 199|-> snprintf(descURL, len, "%s%s%s", http_scheme, ipPortStr, alias); # 200| UpnpPrintf( # 201| UPNP_INFO, API, __FILE__, __LINE__, "desc url: %s\n", descURL); Error: CPPCHECK_WARNING: libupnp-1.14.18-build/pupnp-release-1.14.18/upnp/src/uuid/uuid.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.