summaryrefslogtreecommitdiffstats
path: root/nicintel.c
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2014-05-16 17:52:04 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2014-05-16 17:52:04 +0000
commitf9f3648fcce00c10b12bf2a6dfc444f666db2801 (patch)
tree0baa0faba2c3b478cf20500dcab3d0ae820f1f39 /nicintel.c
parentc03fbf0a2040a082af231f77a5eda46bdc6fdece (diff)
downloadflashrom-f9f3648fcce00c10b12bf2a6dfc444f666db2801.zip
flashrom-f9f3648fcce00c10b12bf2a6dfc444f666db2801.tar.gz
AT45DB: fix read functions
This fixes segfaults on reads (implicit reads on writes too), ouch. Thanks to The Raven for reporting the problem and testing my patch, and to Alexander Irenkov for providing a workable fix for it additionally. There were actually two problems: 1) The loop conditions were bogus which could lead to read errors (e.g. on implicit erase verifications). 2) The offset used within the read buffers provided to spi_nbyte_read() and memcpy() were not starting at 0 but the offset of the block within the flash chip (which has nothing to do with read buffer in most cases). This patch works similarly to Alexander's but is intended to be more readable. Corresponding to flashrom svn r1792. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'nicintel.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud