Fix another instance of unsafe coding for shm_toc_lookup failure.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: d59ff4ab3111f20054425d82dab1393101dcfe8e
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2018-02-02T23:32:05Z
Releases: 11.0
Fix another instance of unsafe coding for shm_toc_lookup failure.

One or another author of commit 5bcf389ec seems to have thought that
computing an offset from a NULL pointer would yield another NULL pointer.
There may possibly be architectures where that works, but common machines
don't work like that.  Per a quick code review of places calling
shm_toc_lookup and not using noError = false.

Files

PathChange+/−
src/backend/executor/nodeHash.c modified +5 −1