From: Tom Lane Date: Thu, 8 Aug 2002 01:22:35 +0000 (+0000) Subject: parseTypeString wasn't quite paranoid enough. X-Git-Tag: REL7_3~991 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13e8be42bd51a4acad264f62dc86ed1c30aeaea5;p=postgresql parseTypeString wasn't quite paranoid enough. --- diff --git a/src/backend/parser/parse_type.c b/src/backend/parser/parse_type.c index 59c534a7ef..0eb29045b1 100644 --- a/src/backend/parser/parse_type.c +++ b/src/backend/parser/parse_type.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.47 2002/08/02 18:15:07 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.48 2002/08/08 01:22:35 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -461,6 +461,8 @@ parseTypeString(const char *str, Oid *type_id, int32 *typmod) elog(ERROR, "parseTypeString: Invalid type name '%s'", str); typecast = (TypeCast *) restarget->val; if (typecast == NULL || + !IsA(typecast, TypeCast) || + typecast->arg == NULL || !IsA(typecast->arg, A_Const)) elog(ERROR, "parseTypeString: Invalid type name '%s'", str); typename = typecast->typename;