Fix memory access out of bound problem in command line argument processing.