Commit 852a1e8
net: sockets: getnameinfo: Cast to sockaddr_in6 instead of sockaddr_in
As explained in the comment in the code, both structs have the same
offsets for it's fields, but sockaddr_in is smaller, hence it can
confuse static analyzer, giving warnings about potential out-of-bound
access. Therefore, cast to sockaddr_in6 instead to avoid the warning.
Signed-off-by: Robert Lubos <[email protected]>1 parent 487386e commit 852a1e8
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
0 commit comments