git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c826991)
Fix erroneous error message printout when a configuration file contains
2004年5月25日 19:11:14 +0000 (19:11 +0000)
2004年5月25日 19:11:14 +0000 (19:11 +0000)
an overlength token. Printout was always garbage and could dump core
entirely :-(. Per report from Martin Pitt.


diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c
index 00acbcf561708afe920e15a6cfb6e4658801a8e7..d4204acfd576acaec5d7913b921381d5147622e9 100644 (file)
--- a/src/backend/libpq/hba.c
+++ b/src/backend/libpq/hba.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.121 2004年05月19日 22:06:16 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.122 2004年05月25日 19:11:14 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -144,14 +144,14 @@ next_token(FILE *fp, char *buf, int bufsz)
if (buf >= end_buf)
{
+ *buf = '0円';
ereport(LOG,
(errcode(ERRCODE_CONFIG_FILE_ERROR),
errmsg("authentication file token too long, skipping: \"%s\"",
- buf)));
+ start_buf)));
/* Discard remainder of line */
while ((c = getc(fp)) != EOF && c != '\n')
;
- buf[0] = '0円';
break;
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /