From: Tom Lane <tgl@sss.pgh.pa.us>
To: Quentin Rameau <quinq@fifth.space>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [PATCH] Fix missing argument handling in psql getopt
Date: Sun, 25 Aug 2019 11:02:32 -0400
Message-ID: <14042.1566745352@sss.pgh.pa.us> (raw)
In-Reply-To: <20190825100617.GA6087@fifth.space>
References: <20190825100617.GA6087@fifth.space>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, quinq@fifth.space
Subject: Re: [PATCH] Fix missing argument handling in psql getopt
In-Reply-To: <14042.1566745352@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox