2 ms·
The problem here was the memory leak, because it didn't free the enormous buffer in the failure path.
by caf 10y ago
The problem here was the memory leak, because it didn't free the enormous buffer in the failure path.
- kbenson 10y agoNo, the original post was about a memory leak. This is really just a follow on about finding weird values popping up in protocols. Also, even if we do constrain this to memory leaks, I would say that leaks just make the problem worse, and a real bad bug that causes a persistent DOS rather than just an ephemeral DOS, but it's still a problem without them. Actually allocating the memory prior to confirming you need it is bad because if you get enough requests that do that quick enough, you eat up all the memory. If you aren't freeing the memory, you just don't have to be as quick. Considering that that crazy value in question here that is being passed to malloc represents over 1GB of memory, it wouldn't take that many requests at all.