dnie: Avoid insane memory allocations
dnie: Avoid insane memory allocations

Thanks oss-fuzz

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20916

AktivCo/OpenSC,metsma/OpenSC,philipWendland/OpenSC,rickyepoderi/OpenSC,fabled/OpenSC,AktivCo/OpenSC,hongquan/OpenSC-main,AktivCo/OpenSC,metsma/OpenSC,OpenSC/OpenSC,fabled/OpenSC,frankmorgner/OpenSC,Jakuje/OpenSC,Jakuje/OpenSC,frankmorgner/OpenSC,dengert/OpenSC,fabled/OpenSC,hongquan/OpenSC-main,mouse07410/OpenSC,rickyepoderi/OpenSC,mouse07410/OpenSC,fabled/OpenSC,dengert/OpenSC,LudovicRousseau/OpenSC,dengert/OpenSC,LudovicRousseau/OpenSC,hongquan/OpenSC-main,rickyepoderi/OpenSC,OpenSC/OpenSC,metsma/OpenSC,mouse07410/OpenSC,LudovicRousseau/OpenSC,Jakuje/OpenSC,frankmorgner/OpenSC,philipWendland/OpenSC,frankmorgner/OpenSC,Jakuje/OpenSC,OpenSC/OpenSC,philipWendland/OpenSC