• Forum
  • Lounge
  • Microsoft finds critical hole in operati

 
Microsoft finds critical hole in operating system that for once isn't Windows

Oh wow, get a load of Google using strcpy() all wrong – strcpy! Haha, you'll never ever catch us doing that.

https://www.theregister.com/2022/08/23/microsoft_chromeos_bug/
We never use strcpy(). This is C++, not some class-less hack like C!
There was a reason why MS created a strcpy_s version before the C ISO committee did in C11.

Something the C++ ISO committee hasn't done yet.
or just use snprintf()... Won't buffer overflow (if correct size given) and result will always be properly null-terminated.

Topic archived. No new replies allowed.