> if (n && m > (size_t)-1/n)
Shouldn't the case of wraparound be caught by testing the resulting size as following?
s = n*m;
if (n && s >= n && s >= m) /* no overflow */ ...Shouldn't the case of wraparound be caught by testing the resulting size as following?
s = n*m;
if (n && s >= n && s >= m) /* no overflow */ ...