~ubuntu-branches/ubuntu/trusty/postgresql-9.3/trusty-security

« back to all changes in this revision

Viewing changes to src/backend/access/spgist/spginsert.c

  • Committer: Package Import Robot
  • Author(s): Martin Pitt, CVE-2014-8161
  • Date: 2015-02-06 12:47:00 UTC
  • mfrom: (1.2.1) (18.1.1 trusty-proposed)
  • Revision ID: package-import@ubuntu.com-20150206124700-2br6bkfzuayfy8j8
Tags: 9.3.6-0ubuntu0.14.04
* New upstream security/bug fix release (LP: #1418928)
  - Fix buffer overruns in to_char() [CVE-2015-0241]
  - Fix buffer overruns in contrib/pgcrypto [CVE-2015-0243]
  - Fix possible loss of frontend/backend protocol synchronization after an
    error [CVE-2015-0244]
  - Fix information leak via constraint-violation error messages
    [CVE-2014-8161]
  - See release notes for details about other fixes:
    http://www.postgresql.org/about/news/1569/

Show diffs side-by-side

added added

removed removed

Lines of Context:
163
163
        page = (Page) palloc(BLCKSZ);
164
164
        SpGistInitMetapage(page);
165
165
 
166
 
        /* Write the page.      If archiving/streaming, XLOG it. */
 
166
        /* Write the page.  If archiving/streaming, XLOG it. */
167
167
        PageSetChecksumInplace(page, SPGIST_METAPAGE_BLKNO);
168
168
        smgrwrite(index->rd_smgr, INIT_FORKNUM, SPGIST_METAPAGE_BLKNO,
169
169
                          (char *) page, true);
232
232
        /*
233
233
         * We might have to repeat spgdoinsert() multiple times, if conflicts
234
234
         * occur with concurrent insertions.  If so, reset the insertCtx each time
235
 
         * to avoid cumulative memory consumption.      That means we also have to
 
235
         * to avoid cumulative memory consumption.  That means we also have to
236
236
         * redo initSpGistState(), but it's cheap enough not to matter.
237
237
         */
238
238
        while (!spgdoinsert(index, &spgstate, ht_ctid, *values, *isnull))