~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to src/backend/optimizer/plan/planner.c

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-02-05 18:13:52 UTC
  • mfrom: (1.1.10) (10.1.5 oneiric-proposed)
  • Revision ID: package-import@ubuntu.com-20130205181352-3kw4f94ilqklzm7c
Tags: 9.1.8-0ubuntu11.10
* New upstream security/bug fix release: (LP: #1116336)
  - Prevent execution of enum_recv from SQL
    The function was misdeclared, allowing a simple SQL command to crash the
    server.  In principle an attacker might be able to use it to examine the
    contents of server memory.  Our thanks to Sumit Soni (via Secunia SVCRP)
    for reporting this issue. (CVE-2013-0255)
  - See HISTORY/changelog.gz for the other bug fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
156
156
        glob = makeNode(PlannerGlobal);
157
157
 
158
158
        glob->boundParams = boundParams;
159
 
        glob->paramlist = NIL;
160
159
        glob->subplans = NIL;
161
160
        glob->subrtables = NIL;
162
161
        glob->subrowmarks = NIL;
166
165
        glob->resultRelations = NIL;
167
166
        glob->relationOids = NIL;
168
167
        glob->invalItems = NIL;
 
168
        glob->nParamExec = 0;
169
169
        glob->lastPHId = 0;
170
170
        glob->lastRowMarkId = 0;
171
171
        glob->transientPlan = false;
254
254
        result->rowMarks = glob->finalrowmarks;
255
255
        result->relationOids = glob->relationOids;
256
256
        result->invalItems = glob->invalItems;
257
 
        result->nParamExec = list_length(glob->paramlist);
 
257
        result->nParamExec = glob->nParamExec;
258
258
 
259
259
        return result;
260
260
}
306
306
        root->glob = glob;
307
307
        root->query_level = parent_root ? parent_root->query_level + 1 : 1;
308
308
        root->parent_root = parent_root;
 
309
        root->plan_params = NIL;
309
310
        root->planner_cxt = CurrentMemoryContext;
310
311
        root->init_plans = NIL;
311
312
        root->cte_plan_ids = NIL;
577
578
         * and attach the initPlans to the top plan node.
578
579
         */
579
580
        if (list_length(glob->subplans) != num_old_subplans ||
580
 
                root->glob->paramlist != NIL)
 
581
                root->glob->nParamExec > 0)
581
582
                SS_finalize_plan(root, plan, true);
582
583
 
583
584
        /* Return internal info if caller wants it */