fixed input checking
fixed input checking

fixes Heap-buffer-overflow WRITE 2 · do_fileid
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=45430

mouse07410/OpenSC,OpenSC/OpenSC,fabled/OpenSC,dengert/OpenSC,philipWendland/OpenSC,LudovicRousseau/OpenSC,LudovicRousseau/OpenSC,dengert/OpenSC,fabled/OpenSC,philipWendland/OpenSC,metsma/OpenSC,OpenSC/OpenSC,mouse07410/OpenSC,LudovicRousseau/OpenSC,mouse07410/OpenSC,metsma/OpenSC,fabled/OpenSC,dengert/OpenSC,philipWendland/OpenSC,fabled/OpenSC,OpenSC/OpenSC,metsma/OpenSC