[BUGS] postgresql-10.0/src/backend/access/transam/clog.c:234: sanity checkafter use ?

Поиск
Список
Период
Сортировка
От David Binderman
Тема [BUGS] postgresql-10.0/src/backend/access/transam/clog.c:234: sanity checkafter use ?
Дата
Msg-id HE1PR0802MB2331CBA919CBFFF0C465EB429C710@HE1PR0802MB2331.eurprd08.prod.outlook.com
обсуждение исходный текст
Ответы Re: [BUGS] postgresql-10.0/src/backend/access/transam/clog.c:234: sanity check after use ?
Список pgsql-bugs
Hello there,


postgresql-10.0/src/backend/access/transam/clog.c:234]: (style) Array index 'i' is used before limits check.

Source code is
       while (TransactionIdToPage(subxids[i]) == pageno && i < nsubxids)

Maybe it is better to sanity check the array index before use, not after.

Regards

David Binderman

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

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

Предыдущее
От: David Binderman
Дата:
Сообщение: Re: [BUGS] postgresql-10.0/src/bin/psql/mainloop.c:465: suspiciouscondition ?
Следующее
От: David Binderman
Дата:
Сообщение: [BUGS] postgresql-10.0/src/backend/optimizer/geqo/geqo_ox2.c:84:sanity checkafter use ?