[Skiboot] [PATCH] hdata/fsp: fixup lpc device node name creation
Stewart Smith
stewart at linux.vnet.ibm.com
Thu Feb 2 18:00:10 AEDT 2017
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 at linux.vnet.ibm.com>
---
hdata/fsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hdata/fsp.c b/hdata/fsp.c
index f81c8dd4ede3..656aad70927e 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 at i3f8 - refers to offset 0x3f8 in the IO space
*/
- snprintf(buffer, sizeof(name), "%s at i%x", name, offset);
+ snprintf(buffer, sizeof(buffer), "%s at i%x", name, offset);
n = dt_new(parent, buffer);
assert(n);
--
2.1.4
More information about the Skiboot
mailing list