ffi: fix buffer overrun when padding struct storage