diff options
author | Bruce Momjian | 2011-11-17 18:24:54 +0000 |
---|---|---|
committer | Bruce Momjian | 2011-11-17 18:24:54 +0000 |
commit | 988f907d2437ea0b45aa0002178610bb9d8a399a (patch) | |
tree | 7ac5a925f66caf3766064865f5dc676a43975168 | |
parent | b735757c3254679af6d6e768e4c59f937e650eb5 (diff) |
Fix pg_upgrade's pg_scandir_internal() to properly handle a NULL
pattern, which is used on PG 9.1 and HEAD (but not pre-9.1). Fixes
crash on Windows.
Backpatched to 9.1.
Reported by Mark Dilger
-rw-r--r-- | contrib/pg_upgrade/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/pg_upgrade/file.c b/contrib/pg_upgrade/file.c index c7b6f5cbfa..d3b0eaf2e2 100644 --- a/contrib/pg_upgrade/file.c +++ b/contrib/pg_upgrade/file.c @@ -296,7 +296,7 @@ pg_scandir_internal(const char *dirname, while ((direntry = readdir(dirdesc)) != NULL) { /* Invoke the selector function to see if the direntry matches */ - if ((*selector) (direntry)) + if (selector && (*selector) (direntry)) { count++; |