diff options
author | raspa0 <raspa0@protonmail.com> | 2016-08-24 06:15:03 +0000 |
---|---|---|
committer | raspa0 <raspa0@protonmail.com> | 2016-08-24 06:15:03 +0000 |
commit | 1905ed7ca2987c49d0415667645ad3e3f894d5b5 (patch) | |
tree | e98961d3a2b6c0f60c62aa07ddca8c03a17db85e /src | |
parent | b0cf42c776f1fc253f38b009cb76ab2c571a936d (diff) | |
download | gnutls-1905ed7ca2987c49d0415667645ad3e3f894d5b5.tar.gz |
src/pkcs11.c: fix mech_list out-of-bounds check
Diffstat (limited to 'src')
-rw-r--r-- | src/pkcs11.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkcs11.c b/src/pkcs11.c index 5f68c07935..38dff72753 100644 --- a/src/pkcs11.c +++ b/src/pkcs11.c @@ -1147,7 +1147,7 @@ pkcs11_mechanism_list(FILE * outfile, const char *url, unsigned int flags, &mechanism); if (ret >= 0) { str = NULL; - if (mechanism <= + if (mechanism < sizeof(mech_list) / sizeof(mech_list[0])) str = mech_list[mechanism]; if (str == NULL) |