Re: [PATCH] Fix missing argument handling in psql getopt
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Quentin Rameau <quinq@fifth.space>
Cc: pgsql-hackers@postgresql.org
Date: 2019-08-25T15:02:32Z
Lists: 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
Commits
-
Avoid platform-specific null pointer dereference in psql.
- fb55e95396ca 10.11 landed
- c693c5c4904d 9.4.25 landed
- 65b1cad5a092 9.5.20 landed
- 6338fa3e715a 13.0 landed
- 5fc7b1e939c4 11.6 landed
- 363382521eb2 12.0 landed
- 28d2ce3c7c99 9.6.16 landed