Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id D60356362C5 for ; Thu, 21 Jan 2010 14:15:00 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 34362-05 for ; Thu, 21 Jan 2010 18:14:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mail.postgresql.org (Postfix) with SMTP id 6A224634C6C for ; Thu, 21 Jan 2010 14:14:47 -0400 (AST) Received: (qmail invoked by alias); 21 Jan 2010 18:14:44 -0000 Received: from unknown (EHLO [192.168.178.22]) [188.194.161.72] by mail.gmx.net (mp072) with SMTP; 21 Jan 2010 19:14:44 +0100 X-Authenticated: #955937 X-Provags-ID: V01U2FsdGVkX1+1+sx/g221+gFYEU24V8T2L0SkKvA545ACNGkdlm 1VltHM8EX0lX/n Message-ID: <4B58998B.4060101@gmx.de> Date: Thu, 21 Jan 2010 19:14:35 +0100 From: Jan-Peter Seifert User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: buffer overflow in 08.04.0100 und 08.04.0200? Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.5 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201001/15 X-Sequence-Number: 10178 Hello, we ran into a problem with the new versions of psqlODBC (08.04.0100 and 08.04.0200), which causes a crash. For example one of our functions that dynamically generates queries does a 'RAISE NOTICE' of the query string before executing it. Sometimes this string gets very long and the driver crashes. In the CommLog the string is cut. The limit seems to be 4095. It somehow seems to be connected to the global socket size which obviously is 4096? However, it's strange that 8.3.400 is not crashing although the string seems to be truncated as well. We checked it with a function that is simply 'raise noticing' a string longer than 4100 characters/bytes. ------------------------------------- CREATE OR REPLACE FUNCTION teststringlength() RETURNS CHAR AS $BODY$ DECLARE BEGIN RAISE NOTICE ' ... more than about 4100 characters ...'; RETURN 'Success'; END; $BODY$ LANGUAGE 'plpgsql' VOLATILE; ----------------------------------------------- It gets executed with 'SELECT teststringlength();' within a psqlODBC-connection that uses the same ODBC data source as the other psqlODBC-Version. In 08.04.0100 and 08.04.0200 it crashes ... in 8.3.400 it doesn't. Is there maybe a new parameter that is missing, because we reused the old data source (I'll check tomorrow)? Thank you very much for any hints, Peter