Fix incorrect calculation in shm_mq_receive.
authorRobert Haas
Thu, 6 Aug 2015 17:25:45 +0000 (13:25 -0400)
committerRobert Haas
Thu, 6 Aug 2015 17:36:00 +0000 (13:36 -0400)
commit6d9864d900e3651413a94e1f86a93f6a03f4dc42
tree59422510767ad57fc3619870aa6769a72cfc0adf
parent680b82eea87291e7e14c03a647de654a65617f04
Fix incorrect calculation in shm_mq_receive.

If some, but not all, of the length word has already been read, and the
next attempt to read sees exactly the number of bytes needed to complete
the length word, or fewer, then we'll incorrectly read less than all of
the available data.

Antonin Houska
src/backend/storage/ipc/shm_mq.c