secure: use sizeof() of the fields being copied