]> git.proxmox.com Git - mirror_qemu.git/commit - linux-user/qemu.h
linux-user: Use signed lengths in uaccess.c
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 15 Mar 2021 20:40:04 +0000 (14:40 -0600)
committerLaurent Vivier <laurent@vivier.eu>
Wed, 7 Apr 2021 16:55:27 +0000 (18:55 +0200)
commit360f0abdc51652b06a3718ed43a8688562e69ca4
tree1cabb7f09d56175334301eca8ae26a7b888b1c56
parentd0d3dd401b70168a353450e031727affee828527
linux-user: Use signed lengths in uaccess.c

Partially revert 09f679b62dff, but only for the length arguments.
Instead of reverting to long, use ssize_t.  Reinstate the > 0 check
in unlock_user.

Fixes: 09f679b62dff
Reported-by: Coverity (CID 1446711)
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20210315204004.2025219-1-richard.henderson@linaro.org>
[lv: remove superfluous semicolon]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/qemu.h
linux-user/uaccess.c