[LTP] [PATCH v2] security/dirtyc0w_shmem: Add new test for CVE-2022-2590
Cyril Hrubis
chrubis@suse.cz
Fri Nov 25 15:35:06 CET 2022
Hi!
> I think the point is that there's no guarantee that NULL will actually
> be defined as (void*)0. It can be defined as a plain integer instead.
> And it *IS* defined as plain integer when the header is #included in C++.
NULL is required to be 0 cast to void* in POSIX.
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stddef.h.html
So at least on POSIX-like systems in C NULL must be ((void*)0)
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list