winsane: Fixed possible invalid memory access