projects
/
users
/
rhaas
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
165fd39
)
Fix pg_upgrade's pg_scandir_internal() to properly handle a NULL
author
Bruce Momjian
<bruce@momjian.us>
Thu, 17 Nov 2011 18:24:55 +0000
(13:24 -0500)
committer
Bruce Momjian
<bruce@momjian.us>
Thu, 17 Nov 2011 18:24:55 +0000
(13:24 -0500)
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
contrib/pg_upgrade/file.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/pg_upgrade/file.c
b/contrib/pg_upgrade/file.c
index 02c81a7fc4e4016e1a822f3a9512a679079a7948..4983e7f5ad9562f62db5e23a8cb8087539c9b6ab 100644
(file)
--- a/
contrib/pg_upgrade/file.c
+++ b/
contrib/pg_upgrade/file.c
@@
-294,7
+294,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++;