Quentin Rameau <quinq@fifth.space> writes: > When passing an argument option with a missing argument, strcmp would > be called with the argv terminating NULL.
Um ... so how would control get there with optind too large? What test case/platform are you considering? (There really shouldn't be *any* case where getopt advances optind past argc, imo.) regards, tom lane