[flashrom] [PATCH] Fix out-of-bounds access if all erase functions fail

Stefan Tauner stefan.tauner at student.tuwien.ac.at
Sat Apr 16 13:37:04 CEST 2011


On Sat, 16 Apr 2011 00:13:50 +0200
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net> wrote:

> We don't care about the memcpy (would be a micro-optimization and
> those are almost always a bad idea). However, we care about good
> debug and error messages.

what does the first loop get us in respect to what you said?

i would change the check_block_eraser method to return different values
for "not suitable" and "not defined/no more methods" (there cant be
holes in the eraser array, right?).
i would then remove the first loop and just do checking and printing in
the main loop.
would you accept a patch for that or is there something i have missed?
-- 
Kind regards/Mit freundlichen Grüßen, Stefan Tauner




More information about the flashrom mailing list