Reply to post: Re: C / C++ compilers and libc could do this too

Rust in peace: Memory bugs in C and C++ code cause security issues so Microsoft is considering alternatives once again

eldakka Silver badge

Re: C / C++ compilers and libc could do this too

But if I've allocated a and b and already verified that they are the same size, whats wrong with using strcpy?

Not performing a check before invoking strcpy that the destination string is long enough for the source string is a developer coding error, not a problem with strcpy itself.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

SUBSCRIBE TO OUR WEEKLY TECH NEWSLETTER

Biting the hand that feeds IT © 1998–2019