Re: Windows sockets (select missing events?)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Re: Windows sockets (select missing events?)
Дата
Msg-id CAEudQArx03C3x2UDKjTrknFsxYmx3Bu+A6yyi59y1NRFi2s3xQ@mail.gmail.com
обсуждение исходный текст
Ответ на Windows sockets (select missing events?)  (Ranier Vilela <ranier.vf@gmail.com>)
Ответы Re: Windows sockets (select missing events?)  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
Em qui., 28 de dez. de 2023 às 14:45, Ranier Vilela <ranier.vf@gmail.com> escreveu:
Hi,

The type of field fd_count is defined in winsock.h:
typedef unsigned int    u_int;

So in the struct fd_set,
the field fd_count is unsigned int.

The pgwin32_select  function has loops that use *int* as indices.

Question: in Windows, the socket select function isn't missing some events?
 
If not, It would be a good prevention practice, using the correct type, right?

Patch attached.
Fix overflow with patch.

best regards,
Ranier Vilela
Вложения

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

Предыдущее
От: Ranier Vilela
Дата:
Сообщение: Fix resource leak (src/bin/pg_combinebackup/pg_combinebackup.c)
Следующее
От: Pavel Luzanov
Дата:
Сообщение: Re: Things I don't like about \du's "Attributes" column