Commit aede26d
committed
initialize msg_name with null pointer when msg_name is empty
The msg_name field points to a caller-allocated buffer that is used to
return the source address if the socket is unconnected. The caller
should set msg_namelen to the size of this buffer before this call; upon
return from a successful call, msg_namelen will contain the length of
the returned address. If the application does not need to know the
source address, msg_name can be specified as NULL.
In case we use () msgname_len gets initialized with 0, but pointer to
the array with msg_name. This works for the first iteration somehow, but
after that kernel sets msgname_len to a non-zero and second invocation
with the same MultiHeader fails
Fixes #25061 parent 70f8fe0 commit aede26d
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2002 | 2002 | | |
2003 | 2003 | | |
2004 | 2004 | | |
2005 | | - | |
| 2005 | + | |
2006 | 2006 | | |
2007 | 2007 | | |
2008 | 2008 | | |
| |||
0 commit comments