--describe-config crashes - Mailing list pgsql-patches

From Zdenek Kotala
Subject --describe-config crashes
Date
Msg-id 47BDB9A5.20208@sun.com
Whole thread Raw
Responses Re: --describe-config crashes
List pgsql-patches
Function printMixedStruct calls printf with NULL argument. It causes
segmentation fault. Please, apply it for 8.3 - 8.1 too.

            thanks Zdenek
Index: src/backend/utils/misc/help_config.c
===================================================================
RCS file: /zfs_data/cvs_pgsql/cvsroot/pgsql/src/backend/utils/misc/help_config.c,v
retrieving revision 1.19
diff -c -r1.19 help_config.c
*** src/backend/utils/misc/help_config.c    1 Jan 2008 19:45:54 -0000    1.19
--- src/backend/utils/misc/help_config.c    21 Feb 2008 17:48:00 -0000
***************
*** 117,123 ****

          case PGC_STRING:
              printf("STRING\t%s\t\t\t",
!                    structToPrint->string.boot_val);
              break;

          default:
--- 117,123 ----

          case PGC_STRING:
              printf("STRING\t%s\t\t\t",
!                    (structToPrint->string.boot_val == NULL) ? "(NULL)" : structToPrint->string.boot_val);
              break;

          default:

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Fix pgstatindex using for large indexes
Next
From: Tom Lane
Date:
Subject: Re: fix in --help output