Cast the unsigned char to unsigned int before shifting left
authorTomas Mraz <tmraz@fedoraproject.org>
Tue, 19 May 2020 08:51:19 +0000 (10:51 +0200)
committerTomas Mraz <tmraz@fedoraproject.org>
Wed, 20 May 2020 15:31:43 +0000 (17:31 +0200)
commitcbeb0bfa961412eebfbdf1e72900f05527e81e15
tree2c6d90e55cdca0aa157848a514334d4357eca1ba
parentddec332f329a432a45c0131d83f3bfb46114532b
Cast the unsigned char to unsigned int before shifting left

This is needed to avoid automatic promotion to signed int.

Fixes #11853

[extended tests]

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11857)
crypto/pem/pvkfmt.c