Re: [PATCH] Improve safety of FormatMessage() calls on Windows

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christian Ullrich <chris(at)chrullrich(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Improve safety of FormatMessage() calls on Windows
Date: 2016-03-29 15:57:30
Message-ID: 13471.1459267050@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christian Ullrich <chris(at)chrullrich(dot)net> writes:
> There are some instances of calls to FormatMessage() with the
> FORMAT_MESSAGE_FROM_SYSTEM flag that omit the
> FORMAT_MESSAGE_IGNORE_INSERTS flag. The effect of that is that if the
> requested message string contains any insertion markers, the call to
> FormatMessage() will fail because none of these calls pass an argument list.

> This patch adds the ...IGNORE_INSERTS flag to these calls.

Good catch, pushed (with some cosmetic reformatting).

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2016-03-29 16:11:03 Re: [HACKERS] BUG #13854: SSPI authentication failure: wrong realm name used
Previous Message Petr Jelinek 2016-03-29 15:57:00 Re: WIP: Access method extendability