Re: Patch for snprintf problem (bug #1000650)

From: Ludek Finstrle <luf(at)pzkagis(dot)cz>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Patch for snprintf problem (bug #1000650)
Date: 2006-06-07 20:15:16
Message-ID: 20060607201516.GA28714@soptik.pzkagis.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

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

Ugh typo mistake:

snprintf(buf + strlen(buf), sizeof(buf), " append");

My hands are faster than my head :-(
There is buffer overrun erron becouse I have to decrease sizeof(buf) with
strlen(buf).

So I attach second try of this patch againist CVS HEAD.

Comments are welcome

Luf

Attachment Content-Type Size
psqlodbc_snprintf_2try.diff text/plain 10.7 KB

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Hiroshi Inoue 2006-06-07 23:22:22 Re: DescribParam
Previous Message Ludek Finstrle 2006-06-07 20:08:45 Re: DescribParam