diff options
author | Alvaro Herrera | 2021-04-01 13:04:45 +0000 |
---|---|---|
committer | Alvaro Herrera | 2021-04-01 13:26:20 +0000 |
commit | dde1a35aee6266dc8105717275335c46cd2b3650 (patch) | |
tree | 09a435bbbd19b4e5e363645ed79099d85e79e662 /src/backend/utils/adt/pgstatfuncs.c | |
parent | f82de5c46bdf8cd65812a7b04c9509c218e1545d (diff) |
libpq_pipeline: Must strdup(optarg) to avoid crash
I forgot to strdup() when processing argv[]. Apparently many platforms
hide this mistake from users, but in those that don't you may get a
program crash. Repair.
Per buildfarm member drongo, which is the only one in all the buildfarm
manifesting a problem here.
While at it, move "numrows" processing out of the line of special cases,
and make it getopt's -r instead. (A similar thing could be done to
'conninfo', but current use of the program doesn't warrant spending time
on that -- nowhere else we use conninfo in so simplistic a manner.)
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/utils/adt/pgstatfuncs.c')
0 files changed, 0 insertions, 0 deletions