Using random buffer sizes with no checks always, sooner or later, results in buffer overflows and disaster. Breaking the C++ version so the D mechanical translation works better is not a good solution.