diff --git a/lib/test_kasan.c b/lib/test_kasan.c index 044c54dd43fdb5bd6ad898c68ba61ac3fc48d9fe..c1efb1b610179013baf5d662f40f739a5f9abc60 100644 --- a/lib/test_kasan.c +++ b/lib/test_kasan.c @@ -114,7 +114,7 @@ static noinline void __init kmalloc_oob_krealloc_less(void) kfree(ptr1); return; } - ptr2[size1] = 'x'; + ptr2[size2] = 'x'; kfree(ptr2); }