Skip to content

Commit a2b055d

Browse files
committed
stress-mmaptorture: ensure n is initialized for mappings_unmap exit path
Currentl n is not initialized, and exit path via mappings_unmap uses this as an for-loop upper bounds check. Ensure it is initialized at declaration time. Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
1 parent 77bca13 commit a2b055d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

stress-mmaptorture.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ static int stress_mmaptorture_child(stress_args_t *args, void *context)
459459
do {
460460
unsigned char vec[MMAP_SIZE_MAP];
461461
uint8_t * CLOBBERED ptr;
462-
CLOBBERED size_t n;
462+
CLOBBERED size_t n = 0;
463463
CLOBBERED size_t mmap_size;
464464
CLOBBERED pid_t pid = -1;
465465
CLOBBERED uint64_t total_bytes = 0;

0 commit comments

Comments
 (0)