inlen isn't an untrusted input and it's not this calculation that's overflowing (integer overflow). It's the buffer that oveflows when you allow the operation to proceed based on faulty validation.
The caller shouldn't be responsible for enforcing preconditions of your function. They should just provide the input buffer, output buffer, their sizes and your implementation should verify whether it's safe to proceed.
I think userbinator thought that you meant that the calculation would overflow, while I think you meant that the calculation, even if not overflowing, would return the wrong value under some conditions and that subsequent code would then overflow the buffer. (As for what I think about the actual issue, I’m too sleepy to even try. Which is probably an indication of something. =) )