In practice, calling memcpy with NULL buffer and 0 size works on the
ESP32, but the C standard considers this an undefined behavior.
When building with UBSAN checks enabled, compiler will insert a check
that memcpy argument is non-NULL, regardless of the size argument.
This caused a failure in tools/test_apps/system/panic, which is built
with USBAN enabled for several components.