Files
Robin Krahl aafa02e332 Fix lookahead buffer size reported to littlefs2-sys
Previously, we reported the lookahead buffer size in bytes but
littlefs2-sys expects the lookahead buffer size as a multiple of 8
bytes.  This could lead to a buffer overflow causing filesystem
corruption.  This patch fixes the reported lookahead buffer size.

Note that Storage::LOOKAHEAD_WORDS_SIZE allows users to set invalid
values (as it is measured in 4 bytes, not in 8 bytes).  Invalid values
that were previously accepted because of the wrong buffer size
calculation can now be rejected by littlefs2-sys.

This is a combination of two previous patches:
	https://github.com/trussed-dev/littlefs2/pull/19
	https://github.com/Nitrokey/littlefs2/pull/1

Fixes: https://github.com/trussed-dev/littlefs2/issues/16
2023-02-07 10:01:42 +01:00
..