Debugger crashes when setting a value with quotes

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Debugger crashes when setting a value with quotes
Date: 2011-03-24 14:54:26
Message-ID: 4D8B5B22.3090603@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

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.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2011-03-24 17:11:41 pgAdmin III commit: Properly quote values being deposited in the debugg
Previous Message Dave Page 2011-03-24 10:21:22 Re: User mapping