]> granicus.if.org Git - postgresql/commitdiff
Fix pointer-arithmetic thinko in pg_stat_ssl patch.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 27 Jul 2015 19:58:46 +0000 (15:58 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 27 Jul 2015 19:58:46 +0000 (15:58 -0400)
Nasty memory-stomp bug in commit 9029f4b37406b21a.  It's not apparent how
this survived even cursory testing :-(.  Per report from Peter Holzer.

src/backend/postmaster/pgstat.c

index e9fbc381cc97a4305b84f406855fc01638978815..887095def06661e3d4471fdecdcc683ae6558768 100644 (file)
@@ -3024,7 +3024,7 @@ pgstat_read_current_status(void)
                        localappname += NAMEDATALEN;
                        localactivity += pgstat_track_activity_query_size;
 #ifdef USE_SSL
-                       localsslstatus += sizeof(PgBackendSSLStatus);
+                       localsslstatus++;
 #endif
                        localNumBackends++;
                }