diff --git a/components/dfs/src/dfs_file.c b/components/dfs/src/dfs_file.c index 15b42a2af9..4deba547be 100644 --- a/components/dfs/src/dfs_file.c +++ b/components/dfs/src/dfs_file.c @@ -516,7 +516,7 @@ void cat(const char* filename) do { rt_memset(buffer, 0, sizeof(buffer)); - length = dfs_file_read(&fd, buffer, 81); + length = dfs_file_read(&fd, buffer, sizeof(buffer)-1 ); if (length > 0) { rt_kprintf("%s", buffer);