Content-Length: 253085 | pFad | http://github.com/postgrespro/postgres/commit/0fb6954aa5012fc0c41af364fb328f90e648f6b7

87 Fix breakage of get_ps_display() in the PS_USE_NONE case. · postgrespro/postgres@0fb6954 · GitHub
Skip to content

Commit 0fb6954

Browse files
committed
Fix breakage of get_ps_display() in the PS_USE_NONE case.
Commit 8c6d30f caused this function to fail to set *displen in the PS_USE_NONE code path. If the variable's previous value had been negative, that'd lead to a memory clobber at some call sites. We'd managed not to notice due to very thin test coverage of such configurations, but this appears to explain buildfarm member lorikeet's recent struggles. Credit to Andrew Dunstan for spotting the problem. Back-patch to v13 where the bug was introduced. Discussion: https://postgr.es/m/136102.1648320427@sss.pgh.pa.us
1 parent 411b913 commit 0fb6954

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/backend/utils/misc/ps_status.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ get_ps_display(int *displen)
443443

444444
return ps_buffer + ps_buffer_fixed_size;
445445
#else
446+
*displen = 0;
446447
return "";
447448
#endif
448449
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/0fb6954aa5012fc0c41af364fb328f90e648f6b7

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy