diff options
author | Brandon Maier <brandon.maier@collins.com> | 2022-11-02 17:47:55 -0500 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2022-11-07 08:24:42 +0100 |
commit | 92d826ac57e753da120a82cded354931b3fe8e76 (patch) | |
tree | 200a63e08ed29dc633e0f06247801955ebcdd0b2 /tests/fs-tests/stress/atoms/stress_1.c | |
parent | 345c5bde41fc1238a3f3b9b1a52e30ec7ab99b6e (diff) |
misc-utils: flashcp: fix buffer overflow
The DIFF_BLOCKS code requires that src and dest buffers be large enough
to hold one MTD erasesize. This is because each loop operates on one
eraseblock so that it can erase and write one whole sector. But the src
and dest buffers are fixed at BUFSIZE, so on platforms where the MTD
erasesize are larger then BUFSIZE it will overflow the buffers.
Instead allocate the buffers dynamically so that they can be sized to
fit the erasesize.
Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests/fs-tests/stress/atoms/stress_1.c')
0 files changed, 0 insertions, 0 deletions