Segmentation fault of psql unset

Поиск
Список
Период
Сортировка
Искать

Segmentation fault of psql unset

От:
sugita@sra.co.jp
Дата:
Attached is a patch for following fault.

    $ psql
    test=# \unset
    \unset: missing required argument
    Segmentation fault
    $ 
Index: command.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/bin/psql/command.c,v
retrieving revision 1.63
diff -u -3 -p -r1.63 command.c
--- command.c	2001/11/05 17:46:30	1.63
+++ command.c	2001/12/02 12:30:45
@@ -709,8 +709,7 @@ exec_command(const char *cmd,
 		{
 			psql_error("\\%s: missing required argument\n", cmd);
 			success = false;
-		}
-		if (!SetVariable(pset.vars, opt, NULL))
+		} else if (!SetVariable(pset.vars, opt, NULL))
 		{
 			psql_error("\\%s: error\n", cmd);
 			success = false;

Re: Segmentation fault of psql unset

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
sugita@sra.co.jp writes:
> Attached is a patch for following fault.

>     $ psql
>     test=# \unset
>     \unset: missing required argument
>     Segmentation fault

Good catch!  Patch applied.

			regards, tom lane
FAQ