2 ms·
Yup, exploitable all right. Thanks for the explanation! Usually, what I do is just make a shell around malloc() that checks for failure and aborts the program
by WalterBright 7y ago
Yup, exploitable all right. Thanks for the explanation!
Usually, what I do is just make a shell around malloc() that checks for failure and aborts the program with a message. Then, and only then, it gets converted to a slice.
I'll still maintain, however, that buffer overflows are a couple orders of magnitude more common. You case involves loading a file essentially backwards, which seems awful obscure. When I load files piecemeal, I'm using memory mapped files, not a malloc'd buffer.