ossc-db / pg_store_plans

Store execution plans like pg_stat_statements does for queries.
http://ossc-db.github.io/pg_store_plans/
Other
53 stars 26 forks source link

Add a null-check for stored plan text in pg_store_plans_internal(). #35

Open harukat opened 3 weeks ago

harukat commented 3 weeks ago

Variable pstr retrieved from function ptext_fetch() can be NULL due to various factors. Previously, pstr was passed as-is to each per-format process and used in strlen(), causing a crash when it was NULL.

This is a fix for #34 issue. https://github.com/ossc-db/pg_store_plans/issues/34