]> granicus.if.org Git - postgresql/commitdiff
Fix possibly-uninitialized variable.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 8 May 2017 15:18:40 +0000 (11:18 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 8 May 2017 15:18:40 +0000 (11:18 -0400)
Oversight in e2d4ef8de et al (my fault not Peter's).  Per buildfarm.

Security: CVE-2017-7484

src/backend/utils/adt/rangetypes_selfuncs.c

index ec339d80580242c99ef7bbfb9d8b5fb18bb5810c..0444c63082175fd9d9174e035197fcad1f4a6a7d 100644 (file)
@@ -374,8 +374,8 @@ calc_hist_selectivity(TypeCacheEntry *typcache, VariableStatData *vardata,
 {
        Datum      *hist_values;
        int                     nhist;
-       Datum      *length_hist_values;
-       int                     length_nhist;
+       Datum      *length_hist_values = NULL;
+       int                     length_nhist = 0;
        RangeBound *hist_lower;
        RangeBound *hist_upper;
        int                     i;