Re: [pgadmin-hackers] Re: [pgadmin-hackers] Re: [pgadmin-hackers] error: expected initializer before ‘!’ token - Mailing list pgadmin-hackers

From Dave Page
Subject Re: [pgadmin-hackers] Re: [pgadmin-hackers] Re: [pgadmin-hackers] error: expected initializer before ‘!’ token
Date
Msg-id AANLkTinDXgKLHt2Cb=kR1oUXHYwvzw=4VTC5yw8LopkY@mail.gmail.com
Whole thread Raw
In response to Re: [pgadmin-hackers] Re: [pgadmin-hackers] Re: [pgadmin-hackers] error: expected initializer before ‘!’ token  (Peter Geoghegan <peter@2ndquadrant.com>)
List pgadmin-hackers
On Mon, Mar 14, 2011 at 8:37 PM, Peter Geoghegan <peter@2ndquadrant.com> wrote:
> On 14 March 2011 20:22, Guillaume Lelarge <guillaume@lelarge.info> wrote:
>> So I worked a bit on this issue tonight. I think you didn't allocate
>> enough memory for filename. See the patch attached. With this patch, it
>> works OK for me. I'm wondering if the patch should also do +1 on the
>> other calloc calls. Any ideas on this?
>>
>> Can you check that it still works on Windows and Mac OS X with this patch?
>
> This would of course explain the inconsistent behaviour across
> platforms - it was undefined.
>
> This is the the classic "strlen() doesn't include null terminated byte" mistake.

Yup :-)


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgadmin-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: [pgadmin-hackers] Re: [pgadmin-hackers] Re: [pgadmin-hackers] Re: [pgadmin-hackers] error: expected initializer before ‘!’ token
Next
From: Thom Brown
Date:
Subject: Re: pgAdmin III commit: Fix selection of objects in backup/restore dialogs