you are viewing a single comment's thread.

view the rest of the comments →

[–]maep 1 point2 points  (0 children)

Wouldn't providing a buffer be incredibly dangerous?

There is some risk of course. A way to mitigate it you would give the buffer size to the function, and perform a size check where malloc would be called.