There is a difference between salam sale and gharar. Gharar signifies ambiguity in the terms of the contract itself, while the salam sale is based on clarity and truthfulness.
Dr. Monzer Kahf, a prominent economist and counselor, states: Gharar is ambiguity in the contract itself, such as “delivery in the future” or “1000 kilos of dates or fish” and you know there are hundreds of kinds of fish and dates, or ambiguity in the price such as dealing in the international market with Australia and saying “dollars,” but not specifying if that is US, Australian, or Singaporean dollars.
On the other hand, all contracts must have a definite date of delivery; otherwise life itself becomes difficult for everybody. In fact, setting a definite delivery date removes the ambiguity.
In salam, one of the conditions is that the object of the contract must be a commodity that normally exists in the market at the time of delivery. Therefore, lack of its availability does not normally happen. Exceptional situations do not make the basis of transactions, and they are dealt with through exceptional measures, in this case, cancellation, arbitration, etc.
Finally, we need to remember that life itself requires dealing with and assessing future matters; this is not gharar, this is part of life. Gharar in contracts is when the obligations of the parties are not definitely known to each of them.”