From 0271f1424548518fcd342a40efb4080444b40f29 Mon Sep 17 00:00:00 2001 From: Yoshiyuki Asaba Date: Tue, 22 May 2007 06:21:30 +0000 Subject: [PATCH] Add checking a message length is valid. (Reported by Fujii Masao) --- pool_process_query.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.39.5