]> granicus.if.org Git - strace/commitdiff
tests: check for out of bounds fetch in parsers of stat family syscalls
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 17 Mar 2017 20:15:20 +0000 (20:15 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 17 Mar 2017 20:15:20 +0000 (20:15 +0000)
* tests/xstatx.c (main): Create STRUCT_STAT object using
TAIL_ALLOC_OBJECT_CONST_PTR.

tests/xstatx.c

index 6eb760b54f1ec3d8f96eb0760e7fd433a5f40e62..c7298b9bedd8d0fbdfdf508c6a782ede6efd93d6 100644 (file)
@@ -208,7 +208,7 @@ main(void)
        static const char full[] = "/dev/full";
 # endif
        static const char sample[] = TEST_SYSCALL_STR ".sample";
-       STRUCT_STAT st[2];
+       TAIL_ALLOC_OBJECT_CONST_PTR(STRUCT_STAT, st);
 
        int rc;