aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2017-02-02 18:00:10 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-02-03 14:02:42 +1100
commit86024775a57951261d01d4fa92f8b346733bb982 (patch)
tree3af71375945ed19ac920be2fbe6fdf79d81f3907
parent2cf1579b478e0dfa31788340cab1b99c4c636daa (diff)
downloadskiboot-86024775a57951261d01d4fa92f8b346733bb982.zip
skiboot-86024775a57951261d01d4fa92f8b346733bb982.tar.gz
skiboot-86024775a57951261d01d4fa92f8b346733bb982.tar.bz2
hdata/fsp: fixup lpc device node name creation
snprintf() with size of a pointer rather than the buffer to which we were printing into Found by static analysis. Fixes: 690f9da985b5f40d4f87ff161d43fd6989f6495c Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--hdata/fsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hdata/fsp.c b/hdata/fsp.c
index f81c8dd..656aad7 100644
--- a/hdata/fsp.c
+++ b/hdata/fsp.c
@@ -235,7 +235,7 @@ static struct dt_node *add_lpc_io_node(struct dt_node *parent,
* serial@i3f8 - refers to offset 0x3f8 in the IO space
*/
- snprintf(buffer, sizeof(name), "%s@i%x", name, offset);
+ snprintf(buffer, sizeof(buffer), "%s@i%x", name, offset);
n = dt_new(parent, buffer);
assert(n);