Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6zCr-000766-TB for pgsql-jdbc@arkaria.postgresql.org; Tue, 24 Oct 2017 13:25:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e6zCr-0006nZ-9r for pgsql-jdbc@arkaria.postgresql.org; Tue, 24 Oct 2017 13:25:21 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e6zCK-0005qi-V8 for pgsql-jdbc@postgresql.org; Tue, 24 Oct 2017 13:24:49 +0000 Received: from m69-169.mailgun.net ([166.78.69.169]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1e6zCG-00076E-BC for pgsql-jdbc@postgresql.org; Tue, 24 Oct 2017 13:24:47 +0000 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=github.com; q=dns/txt; s=mailo; t=1508851482; h=Content-Transfer-Encoding: Content-Type: Mime-Version: Subject: Message-ID: To: Reply-To: From: Date: Sender; bh=DHXRJmtUzIRj/qBgWFllvu/oJPxcVSvAwalR/v8Ou5o=; b=BBCpwABHHXTY+RvqHylDODN6XoPCeymaCcCeHT5h2HAyf04oDNeqSRDQE4dF/R8kjlQBl3ab K/qTzSlcP9aY74UwtCfovMiHRaiDNlP2QKpP1PqfxvPd5UZK8lJJFOhcOtREmZWJApG1NG5i kajXqDJ75DrMw43Wb0uHD5AjT94= DomainKey-Signature: a=rsa-sha1; c=nofws; d=github.com; s=mailo; q=dns; h=Sender: Date: From: Reply-To: To: Message-ID: Subject: Mime-Version: Content-Type: Content-Transfer-Encoding; b=nnvHuMs5jQkAZ9PiMfFR7jqeBbw4Kw2PVJNLiW1dQ6n5JGtlhzgoCJFIKeCXUncJCOpFcv VJgRBI2vU+Ao/XRP88+vwiYg9lBMGf6YWXDCLos7z3gOaYYKJfCbtKTpd8PEIiXgNqo/ejzY oosYN8TI9lTLfGEKoO+3vSYSxPd18= X-Mailgun-Sending-Ip: 166.78.69.169 X-Mailgun-Sid: WyI3ZTA2ZSIsICJwZ3NxbC1qZGJjQHBvc3RncmVzcWwub3JnIiwgIjQwZiJd Received: from github.com (Unknown [192.30.252.40]) by mxa.mailgun.org with ESMTP id 59ef3edd.7fe860071390-smtp-out-n01; Tue, 24 Oct 2017 13:23:41 -0000 (UTC) Date: Tue, 24 Oct 2017 06:23:41 -0700 From: zapov Reply-To: zapov To: pgsql-jdbc@postgresql.org Message-ID: <59ef3edd2a7b8_204b3fb77291dc3c725a1@hookshot-fe6-cp1-prd.iad.github.net.mail> Subject: [pgjdbc/pgjdbc] 266ed6: fix: avoid integer overflow when sending large arg... Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=UTF-8 List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org Branch: refs/heads/master Home: https://github.com/pgjdbc/pgjdbc Commit: 266ed61b30e89c2840b7967a8af7ac8ab86407ff https://github.com/pgjdbc/pgjdbc/commit/266ed61b30e89c2840b7967a8af7ac8ab86407ff Author: zapov Date: 2017-10-24 (Tue, 24 Oct 2017) Changed paths: M pgjdbc/src/main/java/org/postgresql/core/Utils.java M pgjdbc/src/main/java/org/postgresql/core/v3/SimpleParameterList.java A pgjdbc/src/test/java/org/postgresql/test/jdbc4/LogTest.java Log Message: ----------- fix: avoid integer overflow when sending large arguments (#946) If an argument is larger than 200MB it would overflow during escaping due to optimistic size estimation. Change size estimation so it works for even larger arguments until StringBuilder crashes with negative size error. -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc