mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-28 16:48:18 +00:00
ext4: correctly zero filename
Since ALLOC_CACHE_ALIGN_BUFFER declares a char* for filename sizeof(filename) is not the size of the buffer. Use the already known length instead. cc: Uma Shankar <uma.shankar@samsung.com> cc: Manjunatha C Achar <a.manjunatha@samsung.com> cc: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl> Acked-by: Marek Vasut <marex@denx.de>
This commit is contained in:
parent
8b9cc866c1
commit
46a5707d9c
1 changed files with 1 additions and 1 deletions
|
@ -840,7 +840,7 @@ int ext4fs_write(const char *fname, unsigned char *buffer,
|
||||||
unsigned int ibmap_idx;
|
unsigned int ibmap_idx;
|
||||||
struct ext_filesystem *fs = get_fs();
|
struct ext_filesystem *fs = get_fs();
|
||||||
ALLOC_CACHE_ALIGN_BUFFER(char, filename, 256);
|
ALLOC_CACHE_ALIGN_BUFFER(char, filename, 256);
|
||||||
memset(filename, 0x00, sizeof(filename));
|
memset(filename, 0x00, 256);
|
||||||
|
|
||||||
g_parent_inode = zalloc(sizeof(struct ext2_inode));
|
g_parent_inode = zalloc(sizeof(struct ext2_inode));
|
||||||
if (!g_parent_inode)
|
if (!g_parent_inode)
|
||||||
|
|
Loading…
Add table
Reference in a new issue