openssl/openssl — pull request #152 by timow (2014-07-15 18:54:08+00:00)
Title: Use unsigned type to exclude potential overflow

If the IV of a private keys' encryption algorithm is very long, assigning the IV
length value to a signed int may result in a negative value. While d2i_X509_PKEY
validates that the length is below EVP_MAX_IV_LENGTH, it does not check for
negative values before memcpy'ing the IV. With the change, the length value is
assigned to an unsigned int variable, excluding a potential out-of-bounds write
via the memcpy.