Avoid integer overflows when computing buffer sizes.
Avoid integer overflows when computing buffer sizes.

If any field size would cause an overflow, fail to create the model.

PiperOrigin-RevId: 460466485
Change-Id: Ic8b84f3b56f2617c04ba04604729f0f76c6d62ee

deepmind/mujoco,deepmind/mujoco,deepmind/mujoco,deepmind/mujoco,deepmind/mujoco