Hello Sanket,Just enter "rollback" and execThe while(wxIsalpha(query.GetChar(wordlen))) wordlen++;As the 'k' in rollback is a char it also tries the next character (worklen = 8) which causes out of bounds check.-- john2015-06-12 13:25 GMT+02:00 Sanket Mehta <sanket.mehta@enterprisedb.com>:Hi John,I have tried to reproduce the scenario but not able to reproduce the crash in my system.can you please provide your steps which causes crash on your machine?Regards,Sanket MehtaSr Software engineerEnterprisedbOn Fri, Jun 12, 2015 at 11:50 AM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:Hi,I am looking into the same and few other issues in code and will send the patch soon.Regards,Sanket MehtaSr Software engineerEnterprisedbOn Fri, Jun 12, 2015 at 1:49 AM, John Obaterspok <john.obaterspok@gmail.com> wrote:Fix crash when string has only alphas (like 'rollback')diff --git a/pgadmin/frm/frmQuery.cpp b/pgadmin/frm/frmQuery.cppindex 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++; /*
Hi John,I have tried to reproduce the scenario but not able to reproduce the crash in my system.can you please provide your steps which causes crash on your machine?Regards,Sanket MehtaSr Software engineerEnterprisedbOn Fri, Jun 12, 2015 at 11:50 AM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:Hi,I am looking into the same and few other issues in code and will send the patch soon.Regards,Sanket MehtaSr Software engineerEnterprisedbOn Fri, Jun 12, 2015 at 1:49 AM, John Obaterspok <john.obaterspok@gmail.com> wrote:Fix crash when string has only alphas (like 'rollback')diff --git a/pgadmin/frm/frmQuery.cpp b/pgadmin/frm/frmQuery.cppindex 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++; /*
Hi,I am looking into the same and few other issues in code and will send the patch soon.Regards,Sanket MehtaSr Software engineerEnterprisedbOn Fri, Jun 12, 2015 at 1:49 AM, John Obaterspok <john.obaterspok@gmail.com> wrote:Fix crash when string has only alphas (like 'rollback')diff --git a/pgadmin/frm/frmQuery.cpp b/pgadmin/frm/frmQuery.cppindex 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++; /*
Fix crash when string has only alphas (like 'rollback')diff --git a/pgadmin/frm/frmQuery.cpp b/pgadmin/frm/frmQuery.cppindex 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++; /*
pgadmin-hackers by date:
Соглашаюсь с условиями обработки персональных данных