On Sun, May 30, 2010 at 03:06:31AM +0200, Carl-Daniel Hailfinger wrote: > Compile tests on non-x86 and non-Linux platforms highly appreciated. > > Signed-off-by: Carl-Daniel Hailfinger <[email protected]>
Acked-by: Uwe Hermann <[email protected]> Compile-tested on x86 Linux only, though. > Index: flashrom-include_cleanup/physmap.c > =================================================================== > --- flashrom-include_cleanup/physmap.c (Revision 1017) > +++ flashrom-include_cleanup/physmap.c (Arbeitskopie) [...] > @@ -311,7 +313,7 @@ > { > char msrfilename[64]; > memset(msrfilename, 0, 64); Maybe we should also replace this hardcoded 64 with a sizeof()? > - sprintf(msrfilename, "/dev/cpu/%d/msr", cpu); > + snprintf(msrfilename, sizeof(msrfilename), "/dev/cpu/%d/msr", cpu); > > if (fd_msr != -1) { > msg_pinfo("MSR was already initialized\n"); > @@ -394,7 +396,7 @@ > { > char msrfilename[64]; > memset(msrfilename, 0, 64); Ditto. > - sprintf(msrfilename, "/dev/cpu%d", cpu); > + snprintf(msrfilename, sizeof(msrfilename), "/dev/cpu%d", cpu); > > if (fd_msr != -1) { > msg_pinfo("MSR was already initialized\n"); Uwe. -- http://hermann-uwe.de | http://sigrok.org http://randomprojects.org | http://unmaintained-free-software.org _______________________________________________ flashrom mailing list [email protected] http://www.flashrom.org/mailman/listinfo/flashrom
