Skip to content

Commit 81045e1

Browse files
committed
Don't try to translate NULL in GetConfigOptionByNum().
Noticed via -fsanitize=undefined. Introduced when a few columns in GetConfigOptionByNum() / pg_settings started to be translated in 72be8c2 / PG 12. Backpatch to all affected branches, for the same reasons as 46ab07f. Discussion: https://postgr.es/m/20220323173537.ll7klrglnp4gn2um@alap3.anarazel.de Backpatch: 12-
1 parent 89a94c2 commit 81045e1

File tree

1 file changed

+1
-1
lines changed
  • src/backend/utils/misc

1 file changed

+1
-1
lines changed

src/backend/utils/misc/guc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9601,7 +9601,7 @@ GetConfigOptionByNum(int varnum, const char **values, bool *noshow)
96019601
values[4] = _(conf->short_desc);
96029602

96039603
/* extra_desc */
9604-
values[5] = _(conf->long_desc);
9604+
values[5] = conf->long_desc != NULL ? _(conf->long_desc) : NULL;
96059605

96069606
/* context */
96079607
values[6] = GucContext_Names[conf->context];

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy