Re: [PATCH v4 2/2] kasan: add test for invalid size in memmove
From: Andrey Ryabinin
Date: Thu Nov 21 2019 - 17:23:12 EST
On 11/12/19 9:53 AM, Walter Wu wrote:
> Test negative size in memmove in order to verify whether it correctly
> get KASAN report.
>
> Casting negative numbers to size_t would indeed turn up as a large
> size_t, so it will have out-of-bounds bug and be detected by KASAN.
>
> Signed-off-by: Walter Wu <walter-zh.wu@xxxxxxxxxxxx>
> Reviewed-by: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
Reviewed-by: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx>