Workaround subject and issuer fields overflow

Structure `x509cert_info` fields `subject` and `issuer`
are doubled in size up to 512 bytes.

We have to use dynamic memory allocation
to completely overcome the issue.

Relates to OpenSC/OpenSC#1412.
This commit is contained in:
Eugene Bright 2018-07-01 03:24:30 +03:00 committed by Frank Morgner
parent 2c0d1b9ab0
commit 332535c544
1 changed files with 2 additions and 2 deletions

View File

@ -350,9 +350,9 @@ struct mech_info {
const char * short_name;
};
struct x509cert_info {
unsigned char subject[256];
unsigned char subject[512];
int subject_len;
unsigned char issuer[256];
unsigned char issuer[512];
int issuer_len;
unsigned char serialnum[128];
int serialnum_len;