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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy