With the upcoming C2y standard, which follows C23, memcpy(0,0,0) as well as some other operations like null+0 or null-null will be well defined.
memcpy(0,0,0)
null+0
null-null
Source: https://developers.redhat.com/articles/2024/12/11/making-memcpynull-null-0-well-defined