1
0
mirror of https://github.com/libretro/RetroArch synced 2025-02-22 21:40:40 +00:00

Merge pull request from alttpo/fix-network-cmd-recvfrom

command: initialize netcmd->cmd_source_len before recvfrom()
This commit is contained in:
Autechre 2021-05-14 13:06:59 +02:00 committed by GitHub
commit 6189fd3f42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -166,6 +166,7 @@ static void command_network_poll(command_t *handle)
char buf[1024];
buf[0] = '\0';
netcmd->cmd_source_len = sizeof(struct sockaddr_storage);
ret = recvfrom(netcmd->net_fd, buf, sizeof(buf) - 1, 0,
(struct sockaddr*)&netcmd->cmd_source,
&netcmd->cmd_source_len);