Fix bug introduced in dbf69cf
(Was writing outside array bounds.)
This commit is contained in:
parent
df0142bd17
commit
9c9812a299
1 changed files with 1 additions and 3 deletions
|
@ -134,7 +134,7 @@ static void ssl_write_signature_algorithms_ext( ssl_context *ssl,
|
|||
size_t *olen )
|
||||
{
|
||||
unsigned char *p = buf;
|
||||
unsigned char sig_alg_list[20];
|
||||
unsigned char *sig_alg_list = buf + 6;
|
||||
size_t sig_alg_len = 0;
|
||||
|
||||
*olen = 0;
|
||||
|
@ -218,8 +218,6 @@ static void ssl_write_signature_algorithms_ext( ssl_context *ssl,
|
|||
*p++ = (unsigned char)( ( sig_alg_len >> 8 ) & 0xFF );
|
||||
*p++ = (unsigned char)( ( sig_alg_len ) & 0xFF );
|
||||
|
||||
memcpy( p, sig_alg_list, sig_alg_len );
|
||||
|
||||
*olen = 6 + sig_alg_len;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue