| 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: | 20060607173910.GA28221@soptik.pzkagis.cz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-odbc |
Hello,
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:
http://pgfoundry.org/tracker/index.php?func=detail&aid=1000650&group_id=1000125&atid=538
The patch is created againist CVS.
Comments are welcome
Luf
| Attachment | Content-Type | Size |
|---|---|---|
| psqlodbc_snprintf.diff | text/plain | 10.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Glenn B. Lawler | 2006-06-07 19:03:56 | DescribParam |
| Previous Message | noreply | 2006-06-07 11:41:21 | [ psqlodbc-Bugs-1000467 ] Can't use (b)lobs with Omnis Studio v4 |