~ubuntu-branches/ubuntu/vivid/postgresql-9.4/vivid-updates

« back to all changes in this revision

Viewing changes to contrib/pg_upgrade/info.c

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2015-10-08 15:36:31 UTC
  • mfrom: (1.2.3) (11.1.2 vivid-proposed)
  • Revision ID: package-import@ubuntu.com-20151008153631-dyiutwil2zjh9pxs
Tags: 9.4.5-0ubuntu0.15.04
* New upstream security/bug fix release: (LP: #1504132)
  - Guard against stack overflows in json parsing.
    If an application constructs PostgreSQL json or jsonb values from
    arbitrary user input, the application's users can reliably crash the
    PostgreSQL server, causing momentary denial of service.  (CVE-2015-5289)

  - Fix contrib/pgcrypto to detect and report too-short crypt() salts
    Certain invalid salt arguments crashed the server or disclosed a few
    bytes of server memory.  We have not ruled out the viability of attacks
    that arrange for presence of confidential information in the disclosed
    bytes, but they seem unlikely.  (CVE-2015-5288)

  - See release notes for details about other fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
                                                const RelInfo *old_rel, const RelInfo *new_rel,
141
141
                                                FileNameMap *map)
142
142
{
 
143
        /* In case old/new tablespaces don't match, do them separately. */
143
144
        if (strlen(old_rel->tablespace) == 0)
144
145
        {
145
146
                /*
147
148
                 * exist in the data directories.
148
149
                 */
149
150
                map->old_tablespace = old_data;
150
 
                map->new_tablespace = new_data;
151
151
                map->old_tablespace_suffix = "/base";
152
 
                map->new_tablespace_suffix = "/base";
153
152
        }
154
153
        else
155
154
        {
156
155
                /* relation belongs to a tablespace, so use the tablespace location */
157
156
                map->old_tablespace = old_rel->tablespace;
 
157
                map->old_tablespace_suffix = old_cluster.tablespace_suffix;
 
158
        }
 
159
 
 
160
        /* Do the same for new tablespaces */
 
161
        if (strlen(new_rel->tablespace) == 0)
 
162
        {
 
163
                map->new_tablespace = new_data;
 
164
                map->new_tablespace_suffix = "/base";
 
165
        }
 
166
        else
 
167
        {
158
168
                map->new_tablespace = new_rel->tablespace;
159
 
                map->old_tablespace_suffix = old_cluster.tablespace_suffix;
160
169
                map->new_tablespace_suffix = new_cluster.tablespace_suffix;
161
170
        }
162
171