No; you can roll your own malloc safely. The real head-ache is beating what is available. So if you don't like the existing scheme copy one that you like and link it with your code. Not sure why you feel malloc implementation are more prone to security issues than using char *.
-
The use of malloc is consider a security issue due to frequently coding errors that result in out of bound writes; but that is not an issue with the implementation of malloc per sey but rather the coding practice that sometime occur with the usage of malloc. HOWEVER this is tangent to the implementation of malloc.
-
So yes I agree with you that some coders who use malloc are sloppy and therefore may have security issues but those issues are not with the implementation of malloc but rather coding style/languages that allow for easy access to unassigned memory (memory not assigned to a specific variable). That is the advantage (for example) of stl strings vs char * (though a strongly typed language like java is more 'secure' than a weakly type lanugage like c/c++.
-
The use of malloc is consider a security issue due to frequently coding errors that result in out of bound writes; but that is not an issue with the implementation of malloc per sey but rather the coding practice that sometime occur with the usage of malloc. HOWEVER this is tangent to the implementation of malloc.
-
So yes I agree with you that some coders who use malloc are sloppy and therefore may have security issues but those issues are not with the implementation of malloc but rather coding style/languages that allow for easy access to unassigned memory (memory not assigned to a specific variable). That is the advantage (for example) of stl strings vs char * (though a strongly typed language like java is more 'secure' than a weakly type lanugage like c/c++.
I was with you right up to the last sentence. Rolling your own malloc is generally a huge security risk!
