From: Yoshiyuki Asaba Date: Tue, 22 May 2007 06:21:30 +0000 (+0000) Subject: Add checking a message length is valid. X-Git-Tag: V3_4~35 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=0271f1424548518fcd342a40efb4080444b40f29;p=pgpool1.git Add checking a message length is valid. (Reported by Fujii Masao) --- diff --git a/pool_process_query.c b/pool_process_query.c index 530367e..fec05fb 100644 --- a/pool_process_query.c +++ b/pool_process_query.c @@ -2736,8 +2736,10 @@ POOL_STATUS SimpleForwardToBackend(char kind, POOL_CONNECTION *frontend, POOL_CO len = ntohl(sendlen) - 4; - if (len <= 0) + if (len == 0) return POOL_CONTINUE; + else if (len < 0) + return POOL_END; p = pool_read2(frontend, len); if (p == NULL)