4 ms·
He is checking if the output is in a sane range. Not if the input values where. This may be correct for a trivial toy example but bite you in actual production
by josefx 4y ago
He is checking if the output is in a sane range. Not if the input values where. This may be correct for a trivial toy example but bite you in actual production code. Fun things like malloc(ab) vs calloc(a,b) where ab overflows in a well defined way and gives you valid pointer to an unexpectedly tiny buffer.
- p0nce 4y agoOnly correct answer in this thread.