projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d5f905
)
Fix erroneous error message printout when a configuration file contains
author
Tom Lane
<tgl@sss.pgh.pa.us>
Tue, 25 May 2004 19:11:26 +0000
(19:11 +0000)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Tue, 25 May 2004 19:11:26 +0000
(19:11 +0000)
an overlength token. Printout was always garbage and could dump core
entirely :-(. Per report from Martin Pitt.
src/backend/libpq/hba.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/libpq/hba.c
b/src/backend/libpq/hba.c
index d77ae5b830ceab3c90ee89bc856555525b350eb5..0f508e910298a594ad86d343bc8a8fbd1a8edb53 100644
(file)
--- a/
src/backend/libpq/hba.c
+++ b/
src/backend/libpq/hba.c
@@
-124,14
+124,14
@@
next_token(FILE *fp, char *buf, const 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;
}