From: Tom Lane Date: Sat, 23 Feb 2008 19:23:51 +0000 (+0000) Subject: Avoid trying to print a NULL char pointer in --describe-config. On some X-Git-Tag: REL8_1_12~34 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f6acc4509e3c9dc4a13e13469e034ffb2a41c40;p=postgresql Avoid trying to print a NULL char pointer in --describe-config. On some platforms this works, but on some it crashes. Zdenek Kotala --- diff --git a/src/backend/utils/misc/help_config.c b/src/backend/utils/misc/help_config.c index 5d66c3382d..b97f374257 100644 --- a/src/backend/utils/misc/help_config.c +++ b/src/backend/utils/misc/help_config.c @@ -10,7 +10,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/misc/help_config.c,v 1.15 2005/02/22 04:38:05 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/misc/help_config.c,v 1.15.2.1 2008/02/23 19:23:51 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -118,7 +118,7 @@ printMixedStruct(mixedStruct *structToPrint) case PGC_STRING: printf("STRING\t%s\t\t\t", - structToPrint->string.boot_val); + structToPrint->string.boot_val ? structToPrint->string.boot_val : ""); break; default: