]> granicus.if.org Git - postgresql/commit
Fix harmless access to uninitialized memory.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 13 May 2014 16:17:28 +0000 (19:17 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 13 May 2014 16:18:28 +0000 (19:18 +0300)
commitf35aef415aa755c4e99f8c0ef83f9d14dbc48bb4
tree7ebfaee90aff388ea10c3c4ec9556603818f3134
parent540ac7cea919623f691b20892ccc50e5e33b5009
Fix harmless access to uninitialized memory.

When cache invalidations arrive while ri_LoadConstraintInfo() is busy
filling a new cache entry, InvalidateConstraintCacheCallBack() compares
the - not yet initialized - oidHashValue field with the to-be-invalidated
hash value. To fix, check whether the entry is already marked as invalid.

Andres Freund
src/backend/utils/adt/ri_triggers.c