fixed memory corruption in encode_file_structure
fixed memory corruption in encode_file_structure

as suggested by Peter Popovec

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