winsane: Added bounds check to tainted length variable

Reported by Coverity CID 84996.
winsane: Added bounds check to tainted record_size variable

Reported by Coverity CID 84990.