pkcs11-tool: check for buffer overflows
pkcs11-tool: check for buffer overflows

Check the subject, issuer and serialNumber will encode in the allocated
space before copying the data.

Thanks to Umberto Rustichelli for the bug report
https://sourceforge.net/p/opensc/mailman/message/32210626/

nmav/OpenSC,Jakuje/OpenSC,l1k/OpenSC,metsma/OpenSC,ieugen/OpenSC,fabled/OpenSC,aobaid/OpenSC,tidatida/OpenSC,viktorTarasov/OpenSC-SM,dirkx/OpenSC,OpenSC/OpenSC,Jakuje/OpenSC,carlhoerberg/OpenSC,dirkx/OpenSC.tokend,gemini/OpenSC,UIKit0/OpenSC,philipWendland/OpenSC,gemini/OpenSC,OpenSC/OpenSC,marschap/pkg-opensc,CardContact/OpenSC,LudovicRousseau/OpenSC,velter/OpenSC,0x7678/OpenSC,mtrojnar/OpenSC,metsma/OpenSC,aobaid/OpenSC,adminmt/OpenSC,LudovicRousseau/OpenSC,ieugen/OpenSC,tidatida/OpenSC,adminmt/OpenSC,marschap/pkg-opensc,Jakuje/OpenSC,financeX/OpenSC,AktivCo/OpenSC,hongquan/OpenSC-main,germanblanco/OpenSC,germanblanco/OpenSC,dirkx/OpenSC.tokend,CardContact/OpenSC,nmav/OpenSC,fabled/OpenSC,ieugen/OpenSC,financeX/OpenSC,financeX/OpenSC,hhonkanen/OpenSC,mouse07410/OpenSC,aobaid/OpenSC,viktorTarasov/OpenSC-SM,jpki/OpenSC,velter/OpenSC,carlhoerberg/OpenSC,carlhoerberg/OpenSC,viktorTarasov/OpenSC-SM,frankmorgner/OpenSC,martinpaljak/OpenSC,hongquan/OpenSC-main,philipWendland/OpenSC,dirkx/OpenSC,mouse07410/OpenSC,gemini/OpenSC,kasparsd/opensc-latvia-id,hhonkanen/OpenSC,carlhoerberg/OpenSC,tidatida/OpenSC,UIKit0/OpenSC,ieugen/OpenSC,0x7678/OpenSC,carlhoerberg/OpenSC,adminmt/OpenSC,dirkx/OpenSC.tokend,dirkx/OpenSC,dengert/OpenSC,jpki/OpenSC,kasparsd/opensc-latvia-id,dirkx/OpenSC.tokend,mtrojnar/OpenSC,kasparsd/opensc-latvia-id,aobaid/OpenSC,OpenSC/OpenSC,philipWendland/OpenSC,AktivCo/OpenSC,martinpaljak/OpenSC,fabled/OpenSC,hhonkanen/OpenSC,marschap/pkg-opensc,UIKit0/OpenSC,Jakuje/OpenSC,0x7678/OpenSC,fabled/OpenSC,metsma/OpenSC,mouse07410/OpenSC,hongquan/OpenSC-main,AktivCo/OpenSC,l1k/OpenSC,dirkx/OpenSC.tokend,frankmorgner/OpenSC,dirkx/OpenSC,financeX/OpenSC,0x7678/OpenSC,frankmorgner/OpenSC,mtrojnar/OpenSC,rickyepoderi/OpenSC,ieugen/OpenSC,LudovicRousseau/OpenSC,UIKit0/OpenSC,germanblanco/OpenSC,kasparsd/opensc-latvia-id,nmav/OpenSC,dirkx/OpenSC.tokend,velter/OpenSC,dengert/OpenSC,financeX/OpenSC,rickyepoderi/OpenSC,velter/OpenSC,dirkx/OpenSC,jpki/OpenSC,frankmorgner/OpenSC,l1k/OpenSC,rickyepoderi/OpenSC,CardContact/OpenSC,dengert/OpenSC,tidatida/OpenSC,adminmt/OpenSC,martinpaljak/OpenSC,marschap/pkg-opensc