The attached patch changes most of the usages of sprintf() to
Bruce Momjian <bruce@momjian.us>
The attached patch changes most of the usages of sprintf() to snprintf() in contrib/. I didn't touch the places where pointer arithmatic was being used, or other areas where the fix wasn't trivial. I would think that few, if any, of the usages of sprintf() were actually exploitable, but it's probably better to be paranoid... Neil Conway
Files
| Path | Change | +/− |
|---|---|---|
| contrib/dbase/dbf2pg.c | modified | +3 −3 |
| contrib/dbase/dbf.c | modified | +4 −4 |
| contrib/findoidjoins/findoidjoins.c | modified | +2 −2 |
| contrib/lo/lo.c | modified | +2 −2 |
| contrib/mSQL-interface/mpgsql.c | modified | +8 −4 |
| contrib/oid2name/oid2name.c | modified | +5 −5 |
| contrib/pgbench/pgbench.c | modified | +10 −10 |
| contrib/pg_dumplo/lo_export.c | modified | +7 −6 |
| contrib/pg_dumplo/lo_import.c | modified | +4 −3 |
| contrib/pg_dumplo/utils.c | modified | +4 −4 |
| contrib/pg_resetxlog/pg_resetxlog.c | modified | +2 −2 |
| contrib/rserv/rserv.c | modified | +10 −8 |
| contrib/spi/refint.c | modified | +14 −12 |
| contrib/spi/timetravel.c | modified | +3 −3 |
| contrib/vacuumlo/vacuumlo.c | modified | +2 −2 |