From: Tom Lane Date: Sat, 23 Feb 2008 19:24:09 +0000 (+0000) Subject: Avoid trying to print a NULL char pointer in --describe-config. On some X-Git-Tag: REL7_4_20~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8355df550d05aea3bbc7c2f99e46a1136a0c7285;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 7adbf6c6f8..6f2476264c 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-2003, PostgreSQL Global Development Group * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/misc/help_config.c,v 1.8 2003/10/18 22:59:09 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/misc/help_config.c,v 1.8.2.1 2008/02/23 19:24:09 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -113,7 +113,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: