From: | "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> |
---|---|
To: | "Paul Cochrane" <paul(dot)m(dot)cochrane(at)tuht(dot)scot(dot)nhs(dot)uk>, <pgsql-odbc(at)postgresql(dot)org> |
Subject: | Re: Bug in convert.c copy_and_convert_field |
Date: | 2005-02-11 21:14:06 |
Message-ID: | E7F85A1B5FF8D44C8A1AF6885BC9A0E4528AD4@ratbert.vale-housing.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
> -----Original Message-----
> From: pgsql-odbc-owner(at)postgresql(dot)org
> [mailto:pgsql-odbc-owner(at)postgresql(dot)org] On Behalf Of Paul Cochrane
> Sent: 11 February 2005 18:06
> To: pgsql-odbc(at)postgresql(dot)org
> Subject: Re: [ODBC] Bug in convert.c copy_and_convert_field
>
> I've found a quick fix to this problem. I've simply added a line:
>
> strncpy(ptr+len, "\0", 1);
>
> just before the mylog line on line 850 of convert.c. I believe this
> simply ensures that there is a NULL at the end of the string
> stored in
> ptr. There may be a more elegant way to do this but it seems to work.
I don't know if this fix is correct or not, but are you sure that ptr is
big enough to do this without clobbering something else?
Regards, Dave.
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2005-02-13 18:14:49 | Re: New release |
Previous Message | Paul Cochrane | 2005-02-11 18:06:27 | Re: Bug in convert.c copy_and_convert_field |