]> git.dujemihanovic.xyz Git - u-boot.git/commit
lib: rsa: fix padding_pss_verify
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 31 Aug 2022 19:13:40 +0000 (21:13 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 15 Sep 2022 13:57:11 +0000 (09:57 -0400)
commit0cd933bb4bd74084d942c42098ebf9e07d9e0f63
treef3f4c2a9d5d19e8b548ce6ed98fbd5610d30bdd7
parent069f0d7506f6e256f9e2ade82e315ef976dfb9ba
lib: rsa: fix padding_pss_verify

Check the that the hash length is shorter than the message length. This
avoids:

    ./tools/../lib/rsa/rsa-verify.c:275:11: warning:
    ‘*db’ may be used uninitialized [-Wmaybe-uninitialized]
      275 |         db[0] &= 0xff >> leftmost_bits;

Fixes: 061daa0b61f0 ("rsa: add support of padding pss")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
lib/rsa/rsa-verify.c