lib/oofatfs: Fix speculative read in create_name.

Signed-off-by: Duncan Lowther <Duncan.Lowther@glasgow.ac.uk>
pull/11786/head
Duncan Lowther 2023-06-08 16:22:17 +01:00
rodzic ca79b49619
commit 25fb651566
Nie znaleziono w bazie danych klucza dla tego podpisu
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -2821,7 +2821,7 @@ static FRESULT create_name ( /* FR_OK: successful, FR_INVALID_NAME: could not
if (di >= FF_MAX_LFN) return FR_INVALID_NAME; /* Reject too long name */
lfn[di++] = wc; /* Store the Unicode character */
}
while (*p == '/' || *p == '\\') p++; /* Skip duplicated separators if exist */
if (wc == '/' || wc == '\\') while (*p == '/' || *p == '\\') p++; /* Skip duplicated separators if exist */
*path = p; /* Return pointer to the next segment */
cf = (wc < ' ') ? NS_LAST : 0; /* Set last segment flag if end of the path */