Content-Length: 285689 | pFad | http://github.com/postgrespro/postgres_cluster/commit/957b90ed6aaa6fb05ecfe90776a0d7d34d344536

51 Fix erroneous error message printout when a configuration file contains · postgrespro/postgres_cluster@957b90e · GitHub
Skip to content

Commit 957b90e

Browse files
committed
Fix erroneous error message printout when a configuration file contains
an overlength token. Printout was always garbage and could dump core entirely :-(. Per report from Martin Pitt.
1 parent c826991 commit 957b90e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/libpq/hba.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.121 2004/05/19 22:06:16 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.122 2004/05/25 19:11:14 tgl Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -144,14 +144,14 @@ next_token(FILE *fp, char *buf, int bufsz)
144144

145145
if (buf >= end_buf)
146146
{
147+
*buf = '\0';
147148
ereport(LOG,
148149
(errcode(ERRCODE_CONFIG_FILE_ERROR),
149150
errmsg("authentication file token too long, skipping: \"%s\"",
150-
buf)));
151+
start_buf)));
151152
/* Discard remainder of line */
152153
while ((c = getc(fp)) != EOF && c != '\n')
153154
;
154-
buf[0] = '\0';
155155
break;
156156
}
157157

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/957b90ed6aaa6fb05ecfe90776a0d7d34d344536

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy