3 ms·
Sorry, didn't read the code yet. But malloc free means stack allocation, thus dangerous to stack attacks. Please clarify.
by rurban 12y ago
Sorry, didn't read the code yet. But malloc free means stack allocation, thus dangerous to stack attacks. Please clarify.
- deleted 12y ago[deleted]
- BinaryIdiot 12y agoI also haven't read the code yet but malloc free may simply mean the code doesn't call malloc but it can still allocate things on the heap using New.
- k4st 12y agoThis program appears to use heap allocation, at least indirectly through its use of std::string. On a more general note, libraries that perform zero dynamic allocation (and instead require the library user to pass in memory) can be very convenient for systems programming where portability is a concern. For example, I use Intel XED instruction encoder/decoder, which is a library that performs no dynamic memory allocation. This allows me to use it in user space and kernel space without hijacking the malloc symbol.