Re: [PATCH] Fix crash when disabling auto commit

From: Sanket Mehta <sanket(dot)mehta(at)enterprisedb(dot)com>
To: John Obaterspok <john(dot)obaterspok(at)gmail(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Fix crash when disabling auto commit
Date: 2015-06-12 06:20:46
Message-ID: CA+yw=mNK+hy2rCA0-X3S37pXejt_srt1i7_zNhNKMMC0xF6npA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi,

I am looking into the same and few other issues in code and will send the
patch soon.

Regards,
Sanket Mehta
Sr Software engineer
Enterprisedb

On Fri, Jun 12, 2015 at 1:49 AM, John Obaterspok <john(dot)obaterspok(at)gmail(dot)com>
wrote:

> Fix crash when string has only alphas (like 'rollback')
>
> diff --git a/pgadmin/frm/frmQuery.cpp b/pgadmin/frm/frmQuery.cpp
> index b5a2f56..110bbc7 100644
> --- a/pgadmin/frm/frmQuery.cpp
> +++ b/pgadmin/frm/frmQuery.cpp
> @@ -2522,7 +2522,7 @@ bool frmQuery::isBeginNotRequired(wxString query)
> /*
> * Check word length (since "beginx" is not "begin").
> */
> - while(wxIsalpha(query.GetChar(wordlen)))
> + while(wordlen < query.Length() && wxIsalpha(query.GetChar(wordlen)))
> wordlen++;
>
> /*
>

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Sanket Mehta 2015-06-12 11:25:14 Re: [PATCH] Fix crash when disabling auto commit
Previous Message Ashesh Vashi 2015-06-12 04:50:07 Re: [PATCH] Add ElapsedTimeToString to format execution time in a more readable manner (instead of showing everything as msec)