[coreboot-gerrit] Change in coreboot[master]: util/inteltool: Remove duplicated error message, switch to snprintf

Maciej Suminski (Code Review) gerrit at coreboot.org
Mon Aug 21 19:20:28 CEST 2017


Hello Pratikkumar V Prajapati, Paul Menzel, build bot (Jenkins), Nico Huber, 

I'd like you to reexamine a change. Please visit

    https://review.coreboot.org/21025

to look at the new patch set (#5).

Change subject: util/inteltool: Remove duplicated error message, switch to snprintf
......................................................................

util/inteltool: Remove duplicated error message, switch to snprintf

Passing a string containing output from strerror() to perror() causes
double error message display. It is also causing segfaults when the
error message is longer than temp_string capacity.

To fix the problems, sterror() call has been removed so the error
message is printed only once. This could be enough to avoid segfaults,
but it is a good practice to limit output size with snprintf().

Change-Id: I5ccc37e404f278cafae0a451c5acaa27d7907cce
Signed-off-by: Maciej Suminski <maciej.suminski at cern.ch>
---
M util/inteltool/cpu.c
1 file changed, 5 insertions(+), 7 deletions(-)


  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/25/21025/5
-- 
To view, visit https://review.coreboot.org/21025
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5ccc37e404f278cafae0a451c5acaa27d7907cce
Gerrit-Change-Number: 21025
Gerrit-PatchSet: 5
Gerrit-Owner: Maciej Suminski <maciej.suminski at cern.ch>
Gerrit-Reviewer: Maciej Suminski <maciej.suminski at cern.ch>
Gerrit-Reviewer: Nico Huber <nico.h at gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: Pratikkumar V Prajapati <pratikkumar.v.prajapati at intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170821/57d98af1/attachment.html>


More information about the coreboot-gerrit mailing list