Normalize fgets() calls to use sizeof() for calculating the buffer size
Peter Eisentraut <peter_e@gmx.net>
Normalize fgets() calls to use sizeof() for calculating the buffer size where possible, and fix some sites that apparently thought that fgets() will overwrite the buffer by one byte. Also add some strlcpy() to eliminate some weird memory handling.
Files
| Path | Change | +/− |
|---|---|---|
| contrib/tsearch2/dict_syn.c | modified | +2 −2 |
| contrib/tsearch2/stopword.c | modified | +1 −1 |
| src/backend/access/transam/xlog.c | modified | +3 −3 |
| src/bin/pg_dump/pg_backup_files.c | modified | +6 −7 |
| src/bin/psql/common.c | modified | +2 −2 |
| src/bin/psql/copy.c | modified | +2 −2 |
| src/bin/psql/prompt.c | modified | +14 −15 |
| src/interfaces/libpq/fe-connect.c | modified | +4 −4 |
| src/interfaces/libpq/fe-secure.c | modified | +2 −3 |
| src/tools/entab/entab.c | modified | +2 −2 |