Following are messages one does not want to see when reviewing the error logs from an applications:
Maximum buffer size exceeded
Uhh… maybe it’s just a really tiny buffer size?
Following are messages one does not want to see when reviewing the error logs from an applications:
Maximum buffer size exceeded
Uhh… maybe it’s just a really tiny buffer size?
I now use the following formula when allocating buffers:
maximum expected size * 2 + 4 terabytes.
I added the part about 4 terabytes based on sad experience. In C++, buffer errors (boundary errors) don’t just say “buffer exceeded”. Instead, they produce randomly strange behavior elsewhere in the application. In MS C++, running under the debugger alters the behavior — sometimes preventing the error from occurring. DOH!
(OK, I know good programming practice says to check boundaries, but no one can follow all those crazy programming rules.)