8000 Merge pull request #829 from attermann/file_term · adafruit/Adafruit_nRF52_Arduino@bba4b53 · GitHub
[go: up one dir, main page]

Skip to content

Commit bba4b53

Browse files
authored
Merge pull request #829 from attermann/file_term
Null termination of file name when max length
2 parents 699a6c5 + 1b12011 commit bba4b53

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libraries/Adafruit_LittleFS/src/Adafruit_LittleFS_File.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ File::File (Adafruit_LittleFS &fs)
3737
_fs = &fs;
3838
_is_dir = false;
3939
_name[0] = 0;
40+
_name[LFS_NAME_MAX] = 0;
4041
_dir_path = NULL;
4142

4243
_dir = NULL;

0 commit comments

Comments
 (0)
0