Task #132416 - added.err
back to task #132416download
Error: CPPCHECK_WARNING (CWE-476):
ppp-2.5.3/pppd/event-handler.c:99: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: n
# 97| {
# 98| struct event_handler *n = malloc(sizeof(*n));
# 99|-> n->next = handlers;
# 100| n->fd = fd;
# 101| n->cb = cb;
Error: GCC_ANALYZER_WARNING (CWE-476):
ppp-2.5.3/pppd/event-handler.c:99:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘n’
ppp-2.5.3/pppd/event-handler.c:98:31: acquire_memory: this call could return NULL
ppp-2.5.3/pppd/event-handler.c:99:5: danger: ‘n’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 97| {
# 98| struct event_handler *n = malloc(sizeof(*n));
# 99|-> n->next = handlers;
# 100| n->fd = fd;
# 101| n->cb = cb;
Error: CPPCHECK_WARNING (CWE-476):
ppp-2.5.3/pppd/event-handler.c:100: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: n
# 98| struct event_handler *n = malloc(sizeof(*n));
# 99| n->next = handlers;
# 100|-> n->fd = fd;
# 101| n->cb = cb;
# 102| n->ctx = ctx;
Error: CPPCHECK_WARNING (CWE-476):
ppp-2.5.3/pppd/event-handler.c:101: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: n
# 99| n->next = handlers;
# 100| n->fd = fd;
# 101|-> n->cb = cb;
# 102| n->ctx = ctx;
# 103| handlers = n;
Error: CPPCHECK_WARNING (CWE-476):
ppp-2.5.3/pppd/event-handler.c:102: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: n
# 100| n->fd = fd;
# 101| n->cb = cb;
# 102|-> n->ctx = ctx;
# 103| handlers = n;
# 104| add_fd(fd);
Error: CPPCHECK_WARNING (CWE-476):
ppp-2.5.3/pppd/plugins/dhcpv6relay/dhcpv6relay.c:301: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: r
# 299|
# 300| r = malloc(sizeof(*r));
# 301|-> r->next = dhcpv6relay_delegations;
# 302| r->prefix = *addr;
# 303| r->len = prefixlen;
Error: GCC_ANALYZER_WARNING (CWE-476):
ppp-2.5.3/pppd/plugins/dhcpv6relay/dhcpv6relay.c:301:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'r'
ppp-2.5.3/pppd/plugins/dhcpv6relay/dhcpv6relay.c:619:6: enter_function: entry to 'dhcpv6relay_client_event'
ppp-2.5.3/pppd/plugins/dhcpv6relay/dhcpv6relay.c:650:8: branch_false: following 'false' branch...
ppp-2.5.3/pppd/plugins/dhcpv6relay/dhcpv6relay.c:657:9: branch_false: ...to here
ppp-2.5.3/pppd/plugins/dhcpv6relay/dhcpv6relay.c:657:8: branch_false: following 'false' branch...
ppp-2.5.3/pppd/plugins/dhcpv6relay/dhcpv6relay.c:662:8: branch_false: ...to here
ppp-2.5.3/pppd/plugins/dhcpv6relay/dhcpv6relay.c:662:8: branch_false: following 'false' branch...
ppp-2.5.3/pppd/plugins/dhcpv6relay/dhcpv6relay.c:666:5: branch_false: ...to here
ppp-2.5.3/pppd/plugins/dhcpv6relay/dhcpv6relay.c:674:8: branch_false: following 'false' branch...
ppp-2.5.3/pppd/plugins/dhcpv6relay/dhcpv6relay.c:681:9: branch_false: ...to here
ppp-2.5.3/pppd/plugins/dhcpv6relay/dhcpv6relay.c:690:5: call_function: calling 'dhcpv6relay_process_packet_for_routes' from 'dhcpv6relay_client_event'
# 299|
# 300| r = malloc(sizeof(*r));
# 301|-> r->next = dhcpv6relay_delegations;
# 302| r->prefix = *addr;
# 303| r->len = prefixlen;
Error: CPPCHECK_WARNING (CWE-476):
ppp-2.5.3/pppd/plugins/dhcpv6relay/dhcpv6relay.c:302: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: r
# 300| r = malloc(sizeof(*r));
# 301| r->next = dhcpv6relay_delegations;
# 302|-> r->prefix = *addr;
# 303| r->len = prefixlen;
# 304| r->valid_until = time(NULL) + lifetime;
Error: CPPCHECK_WARNING (CWE-476):
ppp-2.5.3/pppd/plugins/dhcpv6relay/dhcpv6relay.c:303: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: r
# 301| r->next = dhcpv6relay_delegations;
# 302| r->prefix = *addr;
# 303|-> r->len = prefixlen;
# 304| r->valid_until = time(NULL) + lifetime;
# 305| ppp_timeout(dhcpv6relay_route_timeout, r, lifetime, 0);
Error: CPPCHECK_WARNING (CWE-476):
ppp-2.5.3/pppd/plugins/dhcpv6relay/dhcpv6relay.c:304: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: r
# 302| r->prefix = *addr;
# 303| r->len = prefixlen;
# 304|-> r->valid_until = time(NULL) + lifetime;
# 305| ppp_timeout(dhcpv6relay_route_timeout, r, lifetime, 0);
# 306|
Error: COMPILER_WARNING (CWE-569):
ppp-2.5.3/pppd/sys-linux.c: scope_hint: In function ‘_route_netlink’
ppp-2.5.3/pppd/sys-linux.c:2315:48: warning[-Wparentheses]: suggest parentheses around ‘&&’ within ‘||’
# 2315 | if (resp == 0 || operation == RTM_DELROUTE && -resp == ESRCH)
# | ^
# 2313| /* In some cases the interface could be down already from kernel perspective,
# 2314| * and routes already removed resulting in errno=ESRCH, treat as success */
# 2315|-> if (resp == 0 || operation == RTM_DELROUTE && -resp == ESRCH)
# 2316| return 1; /* success */
# 2317|
Error: COMPILER_WARNING (CWE-563):
ppp-2.5.3/pppd/utils.c: scope_hint: In function ‘ppp_check_access’
ppp-2.5.3/pppd/utils.c:115:14: warning[-Wunused-variable]: unused variable ‘ok’
# 115 | bool ok = false;
# | ^~
# 113| slash = rpath;
# 114| for (;;) {
# 115|-> bool ok = false;
# 116| const char *pname = (slash? part: "it");
# 117|