Re: [PATCH] Fix missing argument handling in psql getopt - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Fix missing argument handling in psql getopt
Date
Msg-id 14042.1566745352@sss.pgh.pa.us
Whole thread Raw
In response to [PATCH] Fix missing argument handling in psql getopt  (Quentin Rameau <quinq@fifth.space>)
Responses Re: [PATCH] Fix missing argument handling in psql getopt  (Quentin Rameau <quinq@fifth.space>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_upgrade: Error out on too many command-line arguments
Next
From: Julien Rouhaud
Date:
Subject: Re: pg_upgrade: Error out on too many command-line arguments