[PATCH testsuite 2/2] tests/ioctl: adjust size of variable passed to ioctl(2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



FIOQSIZE returns a result of type loff_t, which maps to long long int,
so make sure that the variable is large enough to not cause stack
corruption.

Fixes: b11701a55614 ("tests/ioctl: switch to FIOQSIZE")
Signed-off-by: Ondrej Mosnacek <omosnace@xxxxxxxxxx>
---
 tests/ioctl/test_ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/ioctl/test_ioctl.c b/tests/ioctl/test_ioctl.c
index 6fff2d0..9bf732d 100644
--- a/tests/ioctl/test_ioctl.c
+++ b/tests/ioctl/test_ioctl.c
@@ -18,7 +18,7 @@ int main(int argc, char **argv)
 
 	int fd;
 	int rc;
-	int val = 0;
+	long long int val = 0;
 
 	fd = open(argv[1], O_RDONLY, 0);
 
-- 
2.35.1




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux