diff options
author | Piotr Wilczek <p.wilczek@samsung.com> | 2013-10-11 15:43:33 +0200 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-11-08 15:25:13 -0500 |
commit | 73dc8328c3d842c9093d358dad61d4fd8b3fa2c5 (patch) | |
tree | e125170a29034fdc0225dc684d670d69bd9feca5 /fs | |
parent | 01adbce2aa496ff0704bc2b7c3e4280c0e9a8657 (diff) | |
download | u-boot-imx-73dc8328c3d842c9093d358dad61d4fd8b3fa2c5.zip u-boot-imx-73dc8328c3d842c9093d358dad61d4fd8b3fa2c5.tar.gz u-boot-imx-73dc8328c3d842c9093d358dad61d4fd8b3fa2c5.tar.bz2 |
fs:fat: fix set file name function
Curently memcpy copies string without null terminating char because
function strlen returns only number of characters excluding
null terminating character. Replace memcpy with strcpy.
Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Tom Rini <trini@ti.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fat/fat_write.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c index b7a21e0..9f5e911 100644 --- a/fs/fat/fat_write.c +++ b/fs/fat/fat_write.c @@ -57,7 +57,7 @@ static void set_name(dir_entry *dirent, const char *filename) if (len == 0) return; - memcpy(s_name, filename, len); + strcpy(s_name, filename); uppercase(s_name, len); period = strchr(s_name, '.'); |