null iv parameter passed to combo_init()

Поиск
Список
Период
Сортировка
От Zhihong Yu
Тема null iv parameter passed to combo_init()
Дата
Msg-id CALNJ-vSBb2Ees=KB0frYBh7foK-QNZMbK7Vz66bUJa09D+CHAw@mail.gmail.com
обсуждение исходный текст
Ответы Re: null iv parameter passed to combo_init()  (Noah Misch <noah@leadboat.com>)
Список pgsql-hackers
Hi,
In contrib/pgcrypto/pgcrypto.c :

    err = px_combo_init(c, (uint8 *) VARDATA_ANY(key), klen, NULL, 0);

Note: NULL is passed as iv.

When combo_init() is called,

        if (ivlen > ivs)
            memcpy(ivbuf, iv, ivs);
        else
            memcpy(ivbuf, iv, ivlen);

It seems we need to consider the case of null being passed as iv for memcpy() because of this:

/usr/include/string.h:44:28: note: nonnull attribute specified here

What do you think of the following patch ?

Cheers
Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pgsql: Refactor tar method of walmethods.c to rely on the compression m
Следующее
От: Jacob Champion
Дата:
Сообщение: Re: [PoC] Delegating pg_ident to a third party