Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 379aa2f

Browse files
committed
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
1 parent 165fd39 commit 379aa2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/pg_upgrade/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ pg_scandir_internal(const char *dirname,
294294
while ((direntry = readdir(dirdesc)) != NULL)
295295
{
296296
/* Invoke the selector function to see if the direntry matches */
297-
if ((*selector) (direntry))
297+
if (selector && (*selector) (direntry))
298298
{
299299
count++;
300300

0 commit comments

Comments
 (0)