ff_syscall_wrapper.c: in ff_recvfrom() in case of zero *fromlen, *from will not be filled with garbadge values

This commit is contained in:
Sarosh Arif 2022-08-23 15:46:55 +05:00
parent 2cf815a338
commit 06447d0b38
1 changed files with 1 additions and 1 deletions

View File

@ -896,7 +896,7 @@ ff_recvfrom(int s, void *buf, size_t len, int flags,
if (fromlen != NULL)
*fromlen = msg.msg_namelen;
if (from)
if (from && msg.msg_namelen != 0)
freebsd2linux_sockaddr(from, (struct sockaddr *)&bsdaddr);
return (rc);