Avoid possible dereference null pointer (src/backend/catalog/pg_depend.c)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Avoid possible dereference null pointer (src/backend/catalog/pg_depend.c)
Дата
Msg-id CAEudQAqh_RZqoFcYKso5d9VhF-Vd64_ZodfQ_2zSusszkEmyRg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Avoid possible dereference null pointer (src/backend/catalog/pg_depend.c)
Список pgsql-hackers
Hi.

Per Coverity.
     
2. returned_null: SearchSysCacheAttName returns NULL (checked 20 out of 21 times).
3. var_assigned: Assigning: ptup = NULL return value from SearchSysCacheAttName.
 964                ptup = SearchSysCacheAttName(relidattname);
CID 1545986: (#1 of 1): Dereference null return value (NULL_RETURNS)
4. dereference: Dereferencing ptup, which is known to be NULL.

The functions SearchSysCacheAttNum and SearchSysCacheAttName,
need to have the result checked.

The commit 5091995, left an oversight.

Fixed by the patch attached, a change of style, unfortunately, was necessary.

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

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: State of pg_createsubscriber
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Avoid orphaned objects dependencies, take 3