diff options
author | Bruce Momjian <bruce@momjian.us> | 2002-09-02 06:11:43 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2002-09-02 06:11:43 +0000 |
commit | a12b4e279bc12a7cd7b7d679fcac4689ac4aba7b (patch) | |
tree | ff120ff0c156829d771bdc874fe8fbb2aa4fbf6e /src/backend/parser/analyze.c | |
parent | 48e1a39924d9e0674306156a6519cf5688c67c43 (diff) |
I checked all the previous string handling errors and most of them were
already fixed by You. However there were a few left and attached patch
should fix the rest of them.
I used StringInfo only in 2 places and both of them are inside debug
ifdefs. Only performance penalty will come from using strlen() like all
the other code does.
I also modified some of the already patched parts by changing
snprintf(buf, 2 * BUFSIZE, ... style lines to
snprintf(buf, sizeof(buf), ... where buf is an array.
Jukka Holappa
Diffstat (limited to 'src/backend/parser/analyze.c')
-rw-r--r-- | src/backend/parser/analyze.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index 7abb2abfd60..9896011df39 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.246 2002/08/29 07:22:22 ishii Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.247 2002/09/02 06:11:42 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -2153,7 +2153,7 @@ transformSetOperationTree(ParseState *pstate, SelectStmt *stmt) /* * Make the leaf query be a subquery in the top-level rangetable. */ - snprintf(selectName, 32, "*SELECT* %d", length(pstate->p_rtable) + 1); + snprintf(selectName, sizeof(selectName), "*SELECT* %d", length(pstate->p_rtable) + 1); rte = addRangeTableEntryForSubquery(pstate, selectQuery, makeAlias(selectName, NIL), |