summaryrefslogtreecommitdiffstats
path: root/crypto/ex_data.c
diff options
context:
space:
mode:
authorDiego Santa Cruz <Diego.SantaCruz@spinetix.com>2017-05-16 16:05:19 +0200
committerAndy Polyakov <appro@openssl.org>2017-06-01 22:22:24 +0200
commit9a2a0617e5b042ae5d5b53886e30dc47fe778f7f (patch)
tree27eaa48bccf1d34218f51192310210368769a296 /crypto/ex_data.c
parent44191de234b061145a6ed14221927ec0c9c7b7bf (diff)
Fix srp app missing NULL termination with password callback
The password_callback() function does not necessarily NULL terminate the password buffer, the caller must use the returned length but the srp app uses this function as if it was doing NULL termination. This made the -passin and -passout options of "openssl srp" fail inexpicably and randomly or even crash. Fixed by enlarging the buffer by one, so that the maximum password length remains unchanged, and adding NULL termination upon return. [Rearrange code for coding style compliance in process.] This backport of 0e83981d61fc435f42d4bb4d774272b69556b7bc. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3579)
Diffstat (limited to 'crypto/ex_data.c')
0 files changed, 0 insertions, 0 deletions