mobjects: protect against malloc size overflow