Undefined Behavior: MaybeUninit
used incorrectly in every case
#12793
s-cerevisiae
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Bug Description
MaybeUninit::uninit().assume_init()
leads to undefined behavior, which is explicitly stated in the docs. Which means all usages of this type throughout the codebase are incorrect and may lead to severe problems.How to Reproduce
N/A
Expected Behavior
There should be no UB in the codebase.
Operating system(s) on local (controlling) side and remote (controlled) side
Windows, OSX
RustDesk Version(s) on local (controlling) side and remote (controlled) side
main
Screenshots
N/A
Additional Context
Please read the docs on how to correctly use the type in your case, preferably the whole page to make sure you don't make this kind of mistake again.
And please, please do not ignore any errors get into the way because their sole purpose is to tell you that you are doing something wrong.
Finally I recommend you to scrutinize all your
unsafe
usages, there's a huge swarm of unsound APIs by glance.Beta Was this translation helpful? Give feedback.
All reactions