Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 28929476B05 for ; Thu, 19 Sep 2002 13:42:59 -0400 (EDT) Received: from ns1.officenet.no (ns1.officenet.no [193.212.174.3]) by postgresql.org (Postfix) with ESMTP id 6C773476ABE for ; Thu, 19 Sep 2002 13:42:58 -0400 (EDT) Received: from [193.212.174.117] (helo=jeb.officenet.no) by ns1.officenet.no with esmtp (Exim 3.36 #3) id 17s5KK-0005Jk-00; Thu, 19 Sep 2002 19:42:56 +0200 Content-Type: text/plain; charset="iso-8859-1" From: Andreas Joseph Krogh Organization: OfficeNet AS To: thorbjorn.eriksson@ec.se, <_pppp@mail.ru> Subject: Re: Stripping white-space in SELECT statments Date: Thu, 19 Sep 2002 19:42:54 +0200 User-Agent: KMail/1.4.3 Cc: References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200209191942.54258.andreak@officenet.no> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/223 X-Sequence-Number: 9500 On Thursday 19 September 2002 13:41, Thorbj=F6rn Eriksson wrote: > By "our system" I mean the software that uses the database. It is a quit > old software written in C that has been ported a couple of times to > different *NIX platforms using different DBMS's. It uses in-house develop= ed > functions that, depending on parameters, creates a variety of SQL > statements that in the end gets executed by PQexec (from libpq i guess). [snip] > > > artnrgrpmtrln_1<=3D'201901 =FF' This looks like to me that your C software doesn't '\0' terminate its strin= gs=20 proparly and some random byte gets in the query. -- Andreas Joseph Krogh