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:57:22 +0000 (17:57 +0200)
commite11072908742e96a1067bb1b9609bfc27ab05835
tree5ec83dd3d6ddee727a1328faa00056340a5f4e7f
parent5f10fce37b234807c39d6b1b6440585b84b68b65
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)

(cherry picked from commit cbeb0bfa961412eebfbdf1e72900f05527e81e15)
crypto/pem/pvkfmt.c