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

Поиск
Список
Период
Сортировка
От Christian Ullrich
Тема [PATCH] Improve safety of FormatMessage() calls on Windows
Дата
Msg-id nddv2g$tr1$1@ger.gmane.org
обсуждение исходный текст
Ответы Re: [PATCH] Improve safety of FormatMessage() calls on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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.

The documentation for FormatMessage() does not clearly say that a NULL 
argument list is not an implicit IGNORE_INSERTS flag, but Chen does at 
<https://blogs.msdn.microsoft.com/oldnewthing/20071128-00/?p=24353>.

-- 
Christian

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Anastasia Lubennikova
Дата:
Сообщение: Re: [PATCH] Supporting +-Infinity values by to_timestamp(float8)
Следующее
От: David Steele
Дата:
Сообщение: Re: [PATCH v8] GSSAPI encryption support