-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Bug
Copy link
Labels
CoverityA Coverity detected issue or its fixA Coverity detected issue or its fixarea: NetworkingbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug
Description
Static code scan issues found in file:
Category: Null pointer dereferences
Function: net_virtual_interface_attach
Component: Networking
CID: 220535
Details:
zephyr/subsys/net/l2/virtual/virtual.c
Line 212 in b86f7ad
| if (virtual_iface && iface) { |
206 /* Figure out the link address for this interface. The actual link
207 * address is randomized. This must be done before attach is called so
208 * that the attach callback can create link local address for the
209 * network interface (if IPv6). The actual link address is typically
210 * not need in tunnels.
211 */
>>> CID 220535: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "virtual_iface" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
212 if (virtual_iface && iface) {
213 random_linkaddr(ctx->lladdr.addr, sizeof(ctx->lladdr.addr));
214
215 ctx->lladdr.len = sizeof(ctx->lladdr.addr);
216 ctx->lladdr.type = NET_LINK_UNKNOWN;
217
Please fix or provide comments in coverity using the link:
https://scan9.coverity.com/reports.htm#v29271/p12996
Note: This issue was created automatically. Priority was set based on classification
of the file affected and the impact field in coverity. Assignees were set using the CODEOWNERS file.
Metadata
Metadata
Assignees
Labels
CoverityA Coverity detected issue or its fixA Coverity detected issue or its fixarea: NetworkingbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug