tcos: Prevent buffer underflow
tcos: Prevent buffer underflow

Thanks oss-fuzz

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

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