[flashrom] [PATCH] Fix garbage handling in DMI strings.
Stefan Tauner
stefan.tauner at alumni.tuwien.ac.at
Sun Jul 13 14:54:01 CEST 2014
On Fri, 11 Jul 2014 22:15:17 +0200
Stefan Tauner <stefan.tauner at alumni.tuwien.ac.at> wrote:
> Previously we tried to replace garbage characters with <space> directly in
> the read-only memory-mapped SMBIOS area(!). This could never have
> worked for any DMI strings with garbage and results in a segfault on
> machines with such strings.
>
> With this patch the strings are duplicated within dmi_string() already,
> just before we sanitize them. Also, the limit variable used everywhere
> points to the first invalid byte address. Refine respective checks
> accordingly.
>
> Signed-off-by: Stefan Tauner <stefan.tauner at alumni.tuwien.ac.at>
Hi,
a refined version (using isprint() instead of explicit limits) was
committed in r1824. Thanks to Carl-Daniel for the review and Brian for
testing the preliminary patch.
--
Kind regards/Mit freundlichen Grüßen, Stefan Tauner
More information about the flashrom
mailing list