Avoid calling memcpy with lenght of 0