mirror of
https://github.com/openssl/openssl.git
synced 2025-01-30 14:01:55 +08:00
Fix uninitialized read in sigalg parsing code
The check for a duplicate value was reading one entry past where it was supposed to, getting an uninitialized value. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5172)
This commit is contained in:
parent
3e524bf2d1
commit
c1acef9263
@ -1781,7 +1781,7 @@ static int sig_cb(const char *elem, int len, void *arg)
|
||||
|
||||
/* Reject duplicates */
|
||||
for (i = 0; i < sarg->sigalgcnt - 1; i++) {
|
||||
if (sarg->sigalgs[i] == sarg->sigalgs[sarg->sigalgcnt]) {
|
||||
if (sarg->sigalgs[i] == sarg->sigalgs[sarg->sigalgcnt - 1]) {
|
||||
sarg->sigalgcnt--;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user