From fabbbea0b41618d2ffb4017f21cef483aaac6a6a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 21 Sep 2020 09:46:15 +1000 Subject: [PATCH] AP_Fileystem: fixed gcc9 warning --- libraries/AP_Filesystem/AP_Filesystem_FATFS.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Filesystem/AP_Filesystem_FATFS.cpp b/libraries/AP_Filesystem/AP_Filesystem_FATFS.cpp index 46781d7cf8..366c9b6b86 100644 --- a/libraries/AP_Filesystem/AP_Filesystem_FATFS.cpp +++ b/libraries/AP_Filesystem/AP_Filesystem_FATFS.cpp @@ -751,7 +751,7 @@ struct dirent *AP_Filesystem_FATFS::readdir(void *dirp_void) return nullptr; } len = strlen(fno.fname); - strncpy(d->de.d_name,fno.fname,len); + strncpy_noterm(d->de.d_name,fno.fname,len); d->de.d_name[len] = 0; if (fno.fattrib & AM_DIR) { d->de.d_type = DT_DIR;