As far as I understand it, in standard Klondike solitaire, you deal 3 cards at a time from the stock to the waste. What if only 1 or 2 cards are left in the stock?
you deal out the cards up to three. If there are less than three you just deal out those cards. Use what you can. And then put them in the discard pile and start over.
If those are the only cards you have left including the rest of the discard pile then you might be in a lose scenario.