rsa: crash in br_i32_decode() called from rsa_gen_key_prop()
authorRobert Reither <robert.reither@external.thalesgroup.com>
Mon, 14 Sep 2020 11:12:02 +0000 (13:12 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 14 Sep 2020 21:28:52 +0000 (23:28 +0200)
commit8479333ce7f44ff8cd9f00fbcb8ffa2a5b5763f9
tree86b4538d6fac4cffe2b6a60612653bb12ebaba3c
parent00e5fda0063eaa20e9c3f6844ac88c64eb875f23
rsa: crash in br_i32_decode() called from rsa_gen_key_prop()

Fixes problem for unaligned 32bit big-endian access in
lib/rsa/rsa-keyprop.c.

Exchanges br_i32_decode() with get_unaligned_be32().

This will keep the unaligned access for architectures capable and will do
some byte-shift magic for the not so capable ones.

Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-by: Robert Reither <robert.reither@external.thalesgroup.com>
Remove unused include.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/rsa/rsa-keyprop.c