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-25T19:28:12Z
Lists: pgsql-hackers
Quentin Rameau <quinq@fifth.space> writes: > Another better way, I think, to fix this is to check for optopt > instead, which would be set to the option which caused the error, which > if empty means there isn't an error. Meh. We don't use optopt at all today, and I don't especially want to start doing so. A patch that's trying to remove a platform dependency (which is what this is, pedantic arguments that musl can read POSIX better than anyone else notwithstanding) should not do so by introducing hazards of new platform dependencies. I've pushed your original patch (with some comment-tweaking). It seems unlikely to break anything. 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