added security check for integer overflow on parameter -M
added security check for integer overflow on parameter -M

TomT0m/Boolean-c10t,TomT0m/Boolean-c10t,TomT0m/Boolean-c10t,TomT0m/Boolean-c10t,TomT0m/Boolean-c10t,TomT0m/Boolean-c10t