projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d47e7d9
)
MLK-12181 misc: at25: Cleaning up missing null-terminate in conjunction with strncpy
author
Fugang Duan
<b38611@freescale.com>
Mon, 11 Jan 2016 08:10:10 +0000
(16:10 +0800)
committer
Nitin Garg
<nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:49:43 +0000
(14:49 -0500)
Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
Signed-off-by: Fugang Duan <B38611@freescale.com>
drivers/misc/eeprom/at25.c
patch
|
blob
|
history
diff --git
a/drivers/misc/eeprom/at25.c
b/drivers/misc/eeprom/at25.c
index
5afe4cd
..
67eb81a
100644
(file)
--- a/
drivers/misc/eeprom/at25.c
+++ b/
drivers/misc/eeprom/at25.c
@@
-249,7
+249,7
@@
static int at25_fw_to_chip(struct device *dev, struct spi_eeprom *chip)
u32 val;
memset(chip, 0, sizeof(*chip));
- str
n
cpy(chip->name, "at25", sizeof(chip->name));
+ str
l
cpy(chip->name, "at25", sizeof(chip->name));
if (device_property_read_u32(dev, "size", &val) == 0 ||
device_property_read_u32(dev, "at25,byte-len", &val) == 0) {