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

From: Peter Geoghegan <peter(at)2ndquadrant(dot)com>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgadmin-hackers] Re: [pgadmin-hackers] Re: [pgadmin-hackers] error: expected initializer before ‘!’ token
Date: 2011-03-14 20:37:16
Message-ID: AANLkTi=XNPfpKuQWFVUUA0nCXDT4S8yPYuZd2fPtQDgB@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On 14 March 2011 20:22, Guillaume Lelarge <guillaume(at)lelarge(dot)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.

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2011-03-14 20:44:14 pgAdmin III commit: Make sure we allocate enough space for names etc. P
Previous Message Guillaume Lelarge 2011-03-14 20:22:35 Re: [pgadmin-hackers] Re: [pgadmin-hackers] Re: [pgadmin-hackers] error: expected initializer before ‘!’ token