]> git.ipfire.org Git - thirdparty/qemu.git/commit
linux-user: do_setsockopt: fix SOL_ALG.ALG_SET_KEY
authorMichael Tokarev <mjt@tls.msk.ru>
Sun, 31 Mar 2024 10:07:34 +0000 (13:07 +0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Thu, 25 Apr 2024 19:19:13 +0000 (22:19 +0300)
commit2a7c0a16a930cc89e5977072d0c616b41fb29c0d
treeeddaa37b4a6fc2b212b741662152114906bee1e7
parent5433bb518673584f144a150beffea0d99e2e8078
linux-user: do_setsockopt: fix SOL_ALG.ALG_SET_KEY

This setsockopt accepts zero-lengh optlen (current qemu implementation
does not allow this).  Also, there's no need to make a copy of the key,
it is enough to use lock_user() (which accepts zero length already).

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2197
Fixes: f31dddd2fc "linux-user: Add support for setsockopt() option SOL_ALG"
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Message-Id: <20240331100737.2724186-2-mjt@tls.msk.ru>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
(cherry picked from commit 04f6fb897a5aeb3e356a7b889869c9962f9c16c7)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
linux-user/syscall.c