2023-08-02 16:52:06 +02:00
|
|
|
|
|
|
|
Using garbage values will cause the program to behave
|
|
|
|
nondeterministically at runtime.
|
|
|
|
The program may produce a different output or crash depending on the run.
|
|
|
|
|
2024-03-08 13:13:25 +01:00
|
|
|
In some situations, loading a variable may expose sensitive data,
|
2023-08-02 16:52:06 +02:00
|
|
|
such as a password that was previously stored in the same location,
|
|
|
|
leading to a vulnerability that uses such a defect
|
|
|
|
as a gadget for extracting information from the instance
|
|
|
|
of the program.
|
|
|
|
|
|
|
|
Finally, in {cpp}, outside of a few exceptions related to the uses of `unsigned char` or `std::byte`,
|
|
|
|
loading data from an uninitialized variable causes undefined behavior.
|
|
|
|
This means that the compiler is not bound by the language standard anymore,
|
|
|
|
and the program has no meaning assigned to it.
|
|
|
|
As a consequence,
|
|
|
|
the impact of such a defect is not limited to the use of garbage values.
|