Skip site navigation (1) Skip section navigation (2)

Patch for snprintf problem (bug #1000650)

From: Ludek Finstrle <luf(at)pzkagis(dot)cz>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Patch for snprintf problem (bug #1000650)
Date: 2006-06-07 17:39:10
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc

  I found the problem in snprintf on linux (maybe another unix) boxes
in info.c (CVS HEAD). The problematic part is something like:

buf = "text";
snprintf(buf,size,"%s append",buf);

buf = "text append" on Windows (MS VC compiler)
buf = " append" on linux (gcc compiler)

I solve it this way (main idea):
snprintf(buf + strlen(buf), " append");

There are more parameters (char *, int, ...) in real usage.
More details is here:

The patch is created againist CVS.

Comments are welcome



pgsql-odbc by date

Next:From: Glenn B. LawlerDate: 2006-06-07 19:03:56
Subject: DescribParam
Previous:From: noreplyDate: 2006-06-07 11:41:21
Subject: [ psqlodbc-Bugs-1000467 ] Can't use (b)lobs with Omnis Studio v4

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group