[pgpool-committers: 10219] pgpool: Fix bug in do_query.
Tatsuo Ishii
ishii at postgresql.org
Fri Nov 15 18:07:03 JST 2024
Fix bug in do_query.
Upon receiving DataRow packet, it converts the number of fields from
network byte order to host byte order. Unfortunately it used htons()
for this purpose instead of ntohs(). This is simply wrong. Similarly it
used htonl() instead of htohl() while converting the data length from
network byte order to host byte order. This is wrong too. But
fortunately both ntohs()/htons() and ntohl()/htonl() swap the byte and
they bring the same result (i.e. htonl(data_len) ==
ntohl(data_len). So actually the bug does not hurt anything.
However a bug is a bug. This commit fixes them.
Backpatch-through: v4.1
Branch
------
V4_1_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=ec2af6d8d34df62d662aa6b35014a1409938cd9e
Modified Files
--------------
src/protocol/pool_process_query.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
More information about the pgpool-committers
mailing list