4 ms·
You can pass a negative number such that num * 64 will underflow and result in a large positive number. (Technically it's UB, but in practice it will probably u
by jstimpfle 7y ago
You can pass a negative number such that num * 64 will underflow and result in a large positive number. (Technically it's UB, but in practice it will probably underflow).
Or as someone else mentions, even without underflow, it will be converted to unsigned since malloc takes a size_t.