4 ms·
Similarly broken how? Just because strdupa is not magical, does not mean it has its valid uses. In particular, the problem you allude to (knowing the scope of
by tomegun 12y ago
Similarly broken how?
Just because strdupa is not magical, does not mean it has its valid uses. In particular, the problem you allude to (knowing the scope of your memory) is something you would have to get right also if you use heap-allocated memory (unless you just leak everything of course, but I think we have established that that's not something we want to do).