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

Commit 2e0e563

Browse files
committed
Avoid trying to print a NULL char pointer in --describe-config. On some
platforms this works, but on some it crashes. Zdenek Kotala
1 parent 9713c06 commit 2e0e563

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/utils/misc/help_config.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/help_config.c,v 1.19 2008/01/01 19:45:54 momjian Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/help_config.c,v 1.20 2008/02/23 19:23:33 tgl Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -117,7 +117,7 @@ printMixedStruct(mixedStruct *structToPrint)
117117

118118
case PGC_STRING:
119119
printf("STRING\t%s\t\t\t",
120-
structToPrint->string.boot_val);
120+
structToPrint->string.boot_val ? structToPrint->string.boot_val : "");
121121
break;
122122

123123
default:

0 commit comments

Comments
 (0)