sc_decompress_zlib_alloc: check inputs, avoid int underflow (#1907)
sc_decompress_zlib_alloc: check inputs, avoid int underflow (#1907)

- turns out, you can shrink a buffer with realloc on some implementations
- realloc is never called with 0 (which would free the data)
- length checking is done in zlib, we just do the allocation

closes https://github.com/OpenSC/OpenSC/issues/1905
mouse07410/OpenSC,frankmorgner/OpenSC,AktivCo/OpenSC,dengert/OpenSC,Jakuje/OpenSC,AktivCo/OpenSC,fabled/OpenSC,dengert/OpenSC,LudovicRousseau/OpenSC,hongquan/OpenSC-main,philipWendland/OpenSC,fabled/OpenSC,metsma/OpenSC,metsma/OpenSC,Jakuje/OpenSC,metsma/OpenSC,rickyepoderi/OpenSC,mouse07410/OpenSC,rickyepoderi/OpenSC,Jakuje/OpenSC,Jakuje/OpenSC,OpenSC/OpenSC,fabled/OpenSC,mouse07410/OpenSC,frankmorgner/OpenSC,hongquan/OpenSC-main,philipWendland/OpenSC,frankmorgner/OpenSC,frankmorgner/OpenSC,AktivCo/OpenSC,hongquan/OpenSC-main,dengert/OpenSC,philipWendland/OpenSC,OpenSC/OpenSC,OpenSC/OpenSC,rickyepoderi/OpenSC,fabled/OpenSC,LudovicRousseau/OpenSC,LudovicRousseau/OpenSC