R – This form of use of printf api makes it safer

apibuffer-overflowc

char str[] = "some text";

printf ( "%.*s", strlen(str), str );

** Of course, their buffers, strings yet to be properly targeted

Best Answer

No, that just shifts the problem of detecting the end of the string from printf to strlen, and it's still exactly the same.

Related Topic