I checked all the previous string handling errors and most of them were
Bruce Momjian <bruce@momjian.us>
I checked all the previous string handling errors and most of them were already fixed by You. However there were a few left and attached patch should fix the rest of them. I used StringInfo only in 2 places and both of them are inside debug ifdefs. Only performance penalty will come from using strlen() like all the other code does. I also modified some of the already patched parts by changing snprintf(buf, 2 * BUFSIZE, ... style lines to snprintf(buf, sizeof(buf), ... where buf is an array. Jukka Holappa
Files
| Path | Change | +/− |
|---|---|---|
| contrib/cube/cubeparse.y | modified | +2 −1 |
| contrib/intarray/_int.c | modified | +12 −13 |
| contrib/seg/segparse.y | modified | +3 −2 |
| contrib/spi/refint.c | modified | +12 −12 |
| contrib/spi/timetravel.c | modified | +3 −3 |
| doc/src/sgml/spi.sgml | modified | +2 −2 |
| src/backend/parser/analyze.c | modified | +2 −2 |
| src/backend/storage/file/fd.c | modified | +4 −4 |
| src/backend/utils/adt/ri_triggers.c | modified | +31 −31 |
| src/bin/pg_dump/pg_dump.c | modified | +2 −2 |
| src/bin/psql/command.c | modified | +2 −2 |
| src/interfaces/ecpg/preproc/pgc.l | modified | +4 −4 |
| src/interfaces/ecpg/preproc/preproc.y | modified | +15 −15 |
| src/interfaces/ecpg/preproc/variable.c | modified | +6 −6 |
| src/interfaces/libpgtcl/pgtclCmds.c | modified | +3 −2 |
| src/interfaces/libpq/fe-auth.c | modified | +4 −4 |