Re: pgsql: Properly handle Win32 paths of 'E:abc', which can be either abso

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Properly handle Win32 paths of 'E:abc', which can be either abso
Date: 2011-02-13 05:14:18
Message-ID: 201102130514.p1D5EIh10809@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Properly handle Win32 paths of 'E:abc', which can be either absolute or
> > relative, by creating a function path_is_relative_and_below_cwd() to
> > check for specific requirements. It is unclear if this fixes a security
> > problem or not but the new code is more robust.
>
> Surely this test is backwards?
>
> +bool
> +path_is_relative_and_below_cwd(const char *path)
> +{
> + if (!is_absolute_path(path))
> + return false;

Yes, sorry, corrected.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2011-02-13 05:14:48 pgsql: Fix reverse 'if' test in path_is_relative_and_below_cwd(), per T
Previous Message Tom Lane 2011-02-12 21:41:35 pgsql: Refactor ALTER EXTENSION UPDATE to have cleaner multi-step seman