mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
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>
This commit is contained in:
parent
01adbce2aa
commit
73dc8328c3
1 changed files with 1 additions and 1 deletions
|
@ -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, '.');
|
||||
|
|
Loading…
Reference in a new issue