~ubuntu-branches/ubuntu/natty/postgresql-8.4/natty-security

« back to all changes in this revision

Viewing changes to src/backend/parser/parse_type.c

Tags: upstream-8.4.0
ImportĀ upstreamĀ versionĀ 8.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 *
9
9
 *
10
10
 * IDENTIFICATION
11
 
 *        $PostgreSQL: pgsql/src/backend/parser/parse_type.c,v 1.102 2009/01/01 17:23:46 momjian Exp $
 
11
 *        $PostgreSQL: pgsql/src/backend/parser/parse_type.c,v 1.103 2009/06/11 14:49:00 momjian Exp $
12
12
 *
13
13
 *-------------------------------------------------------------------------
14
14
 */
498
498
                                                                  typioparam, atttypmod);
499
499
 
500
500
#ifdef RANDOMIZE_ALLOCATED_MEMORY
 
501
 
501
502
        /*
502
503
         * For pass-by-reference data types, repeat the conversion to see if the
503
504
         * input function leaves any uninitialized bytes in the result.  We can
504
 
         * only detect that reliably if RANDOMIZE_ALLOCATED_MEMORY is enabled,
505
 
         * so we don't bother testing otherwise.  The reason we don't want any
 
505
         * only detect that reliably if RANDOMIZE_ALLOCATED_MEMORY is enabled, so
 
506
         * we don't bother testing otherwise.  The reason we don't want any
506
507
         * instability in the input function is that comparison of Const nodes
507
508
         * relies on bytewise comparison of the datums, so if the input function
508
509
         * leaves garbage then subexpressions that should be identical may not get
509
 
         * recognized as such.  See pgsql-hackers discussion of 2008-04-04.
 
510
         * recognized as such.  See pgsql-hackers discussion of 2008-04-04.
510
511
         */
511
512
        if (string && !typform->typbyval)
512
513
        {