Content-Length: 260295 | pFad | http://github.com/postgrespro/postgres/commit/03f8e9a7fee0ad4d87bfe48cb22dbca08fd8e6c4

B7 Fix incorrect assertion in libpqwalreceiver · postgrespro/postgres@03f8e9a · GitHub
Skip to content

Commit 03f8e9a

Browse files
committed
Fix incorrect assertion in libpqwalreceiver
Was supposed to check the length of the array, but was checking its size in bytes. Author: Jacob Brazeal <jacob.brazeal@gmail.com> Discussion: https://www.postgresql.org/message-id/CA%2BCOZaA_9afJxj9ZuO73U5P7WXP%2BZM9NGnZvTDCmBFz0FGP%2BwA@mail.gmail.com
1 parent 2a943af commit 03f8e9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/replication/libpqwalreceiver/libpqwalreceiver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ libpqrcv_connect(const char *conninfo, bool replication, bool logical,
208208
keys[++i] = NULL;
209209
vals[i] = NULL;
210210

211-
Assert(i < sizeof(keys));
211+
Assert(i < lengthof(keys));
212212

213213
conn = palloc0(sizeof(WalReceiverConn));
214214
conn->streamConn = PQconnectStartParams(keys, vals,

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/03f8e9a7fee0ad4d87bfe48cb22dbca08fd8e6c4

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy