Skip to content

Commit 13e8be4

Browse files
committed
parseTypeString wasn't quite paranoid enough.
1 parent c100333 commit 13e8be4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/backend/parser/parse_type.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.47 2002/08/02 18:15:07 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.48 2002/08/08 01:22:35 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -461,6 +461,8 @@ parseTypeString(const char *str, Oid *type_id, int32 *typmod)
461461
elog(ERROR, "parseTypeString: Invalid type name '%s'", str);
462462
typecast = (TypeCast *) restarget->val;
463463
if (typecast == NULL ||
464+
!IsA(typecast, TypeCast) ||
465+
typecast->arg == NULL ||
464466
!IsA(typecast->arg, A_Const))
465467
elog(ERROR, "parseTypeString: Invalid type name '%s'", str);
466468
typename = typecast->typename;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy