Skip site navigation (1) Skip section navigation (2)

Re: Debugger crashes when setting a value with quotes

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Debugger crashes when setting a value with quotes
Date: 2011-03-24 18:43:40
Message-ID: AANLkTinydBo4hWX=xsv94zR-f69x2a+Qd248p3UcM-_+@mail.gmail.com (view raw or flat)
Thread:
Lists: pgadmin-hackers
On Thu, Mar 24, 2011 at 2:54 PM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> Steps to reproduce:
>
> 1. Create a function:
>
> CREATE OR REPLACE FUNCTION barfunc()
>  RETURNS integer AS
> $BODY$
>  DECLARE
>   var int4;
>  BEGIN
>   var := 1;
>   IF 1=2 THEN NULL; END IF;
>   RETURN var;
>  END
> $BODY$
>  LANGUAGE plpgsql;
>
> 2. Start debugging on the function.
>
> 3. Change the value of variable 'var' in the debugger GUI to something with
> a single quote. Like "'123".
>
> 4. Move focus from the cell, pgAdmin3 crashes
>
> Looking at the code in ctlCodeWindow.cpp, it seems that the new value is not
> quoted properly in the call to pldbg_deposit_value() server function.

I've committed a fix for this - thanks.

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

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

In response to

Responses

pgadmin-hackers by date

Next:From: Guillaume LelargeDate: 2011-03-24 19:49:03
Subject: Re: User mapping
Previous:From: Dave PageDate: 2011-03-24 17:11:41
Subject: pgAdmin III commit: Properly quote values being deposited in thedebugg

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group