- Notifications
You must be signed in to change notification settings - Fork5k
Commitdde1a35
committed
libpq_pipeline: Must strdup(optarg) to avoid crash
I forgot to strdup() when processing argv[]. Apparently many platformshide this mistake from users, but in those that don't you may get aprogram crash. Repair.Per buildfarm member drongo, which is the only one in all the buildfarmmanifesting 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 timeon that -- nowhere else we use conninfo in so simplistic a manner.)Discussion:https://postgr.es/m/20210401124850.GA19247@alvherre.pgsql1 parentf82de5c commitdde1a35
File tree
2 files changed
+18
-19
lines changed- src/test/modules/libpq_pipeline
- t
2 files changed
+18
-19
lines changedLines changed: 16 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
725 | 725 |
| |
726 | 726 |
| |
727 | 727 |
| |
728 |
| - | |
| 728 | + | |
729 | 729 |
| |
730 | 730 |
| |
731 | 731 |
| |
| |||
1227 | 1227 |
| |
1228 | 1228 |
| |
1229 | 1229 |
| |
1230 |
| - | |
| 1230 | + | |
1231 | 1231 |
| |
1232 | 1232 |
| |
| 1233 | + | |
1233 | 1234 |
| |
1234 | 1235 |
| |
1235 | 1236 |
| |
| |||
1256 | 1257 |
| |
1257 | 1258 |
| |
1258 | 1259 |
| |
1259 |
| - | |
| 1260 | + | |
1260 | 1261 |
| |
1261 | 1262 |
| |
1262 | 1263 |
| |
1263 | 1264 |
| |
1264 | 1265 |
| |
1265 | 1266 |
| |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
1266 | 1277 |
| |
1267 | 1278 |
| |
1268 | 1279 |
| |
1269 | 1280 |
| |
1270 | 1281 |
| |
1271 |
| - | |
| 1282 | + | |
1272 | 1283 |
| |
1273 | 1284 |
| |
1274 | 1285 |
| |
| |||
1285 | 1296 |
| |
1286 | 1297 |
| |
1287 | 1298 |
| |
1288 |
| - | |
1289 |
| - | |
1290 |
| - | |
1291 |
| - | |
1292 |
| - | |
1293 |
| - | |
1294 |
| - | |
1295 |
| - | |
1296 |
| - | |
1297 |
| - | |
1298 |
| - | |
1299 |
| - | |
| 1299 | + | |
1300 | 1300 |
| |
1301 | 1301 |
| |
1302 | 1302 |
| |
|
Lines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 |
| - | |
| 25 | + | |
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
| |||
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
41 |
| - | |
42 |
| - | |
| 41 | + | |
43 | 42 |
| |
44 | 43 |
| |
45 | 44 |
| |
|
0 commit comments
Comments
(0)