Attention is currently required from: Light, Anastasia Klimchuk.
1 comment:
Commit Message:
Patch Set #9, Line 11: when later used in need_erase could result in undefined behaviour.
Can that happen generally, or only when there is another bug? If it
would need another bug, initializing the memory to 0 could make it
harder to detect that.
For instance, if uninitialized data from `curcontents` could end
up on a flash chip. That happening could be much more obvious with
random values compared to constant 0. If we want to prepare for
such bugs, we can choose something better than 0, for instance a
repeated pattern like "flashrom bug! ".
For `oldcontents` I'm not so sure. As it's used to compare to read
data during verification, technically initializing it with pseudo-
random values would be best to detect errors. But some static pat-
tern should serve as well.
To view, visit change 62747. To unsubscribe, or for help writing mail filters, visit settings.