Skip to content

Commit

Permalink
Fix pool_push_pending_data().
Browse files Browse the repository at this point in the history
Fix "insecure data handling".
Per Coverity (CID 1559731)
  • Loading branch information
tatsuo-ishii committed Sep 14, 2024
1 parent 400490d commit 990583a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/protocol/pool_process_query.c
Original file line number Diff line number Diff line change
Expand Up @@ -5225,10 +5225,10 @@ pool_push_pending_data(POOL_CONNECTION * backend)

len_save = len;
len = ntohl(len);
len -= sizeof(len);
buf = NULL;
if ((len - sizeof(len)) > 0)
if (len > 0)
{
len -= sizeof(len);
buf = palloc(len);
pool_read(backend, buf, len);
}
Expand Down

0 comments on commit 990583a

Please sign in to comment.