mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 08:54:38 +09:00
makecert: fix a regression with > 2048 bit
When certificates with more than 2048 bits were generated and written to file the read function used a erroneous calculated length causing the used buffer to overflow.
This commit is contained in:
@@ -1073,14 +1073,15 @@ int makecert_context_process(MAKECERT_CONTEXT* context, int argc, char** argv)
|
||||
break;
|
||||
}
|
||||
|
||||
length = new_len;
|
||||
x509_str = new_str;
|
||||
|
||||
status = BIO_read(bio, &x509_str[offset], length);
|
||||
status = BIO_read(bio, &x509_str[offset], new_len);
|
||||
|
||||
|
||||
if (status < 0)
|
||||
break;
|
||||
|
||||
length = length + new_len;
|
||||
offset += status;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user