Skip site navigation (1) Skip section navigation (2)

Re: GetTokenInformation() and FreeSid() at port/exec.c

From: Andrew Chernow <ac(at)esilo(dot)com>
To: TAKATSUKA Haruka <harukat(at)sraoss(dot)co(dot)jp>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: GetTokenInformation() and FreeSid() at port/exec.c
Date: 2009-06-23 13:14:25
Message-ID: 4A40D531.2030206@esilo.com (view raw or flat)
Thread:
Lists: pgsql-bugs
>> At present, a specific error, crash or trouble seems not to have 
>> happened.

The reason its not crashing is that most, if not all, windows allocation 
functions know which addresses belong to them.  FreeSid is actually 
documented as returning NULL on success.  On failure it returns the 
address you tried to free.

Although the FreeSid call causes no harm because its defensive, there is 
still the issue of leaking the TOKEN_USER structure.

-- 
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/

In response to

pgsql-bugs by date

Next:From: Dave PageDate: 2009-06-23 13:17:02
Subject: Re: [BUGS] Integrity check
Previous:From: David FetterDate: 2009-06-23 13:11:17
Subject: Re: [BUGS] Integrity check

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group