diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-11-27 03:46:01 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-11-27 03:46:01 +0000 |
commit | a568b2273c4208c87172269bcba687512f98887d (patch) | |
tree | 849c7a429f4ceee84644983a1c030455486599db /src | |
parent | f749b4ca9cb9045b3e893b04731a81a06fb45bbf (diff) | |
download | postgresql-a568b2273c4208c87172269bcba687512f98887d.tar.gz postgresql-a568b2273c4208c87172269bcba687512f98887d.zip |
Be a little more careful with strtok().
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/libpq/password.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/libpq/password.c b/src/backend/libpq/password.c index e42b077ed2f..1f1834b6ec1 100644 --- a/src/backend/libpq/password.c +++ b/src/backend/libpq/password.c @@ -2,7 +2,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: password.c,v 1.33 2000/11/27 03:43:49 tgl Exp $ + * $Id: password.c,v 1.34 2000/11/27 03:46:01 tgl Exp $ * */ @@ -66,9 +66,9 @@ verify_password(const Port *port, const char *user, const char *password) p = pw_file_line; test_user = strtok(p, ":"); - test_pw = strtok(NULL, ":"); if (!test_user || test_user[0] == '\0') continue; + test_pw = strtok(NULL, ":"); if (strcmp(user, test_user) == 0) { |