From d996c2e75804e5a0fdc5561b7e3645b287059e2a Mon Sep 17 00:00:00 2001 From: Antoine Juckler <6445757+ajuckler@users.noreply.github.com> Date: Tue, 11 Nov 2025 13:45:09 +0900 Subject: [PATCH] mtd/at25ee.c: Fix write check condition Fix writing till the very last byte of the memory Signed-off-by: Antoine Juckler <6445757+ajuckler@users.noreply.github.com> --- drivers/mtd/at25ee.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/at25ee.c b/drivers/mtd/at25ee.c index 8794c3f1300..94357ee1d80 100644 --- a/drivers/mtd/at25ee.c +++ b/drivers/mtd/at25ee.c @@ -667,7 +667,7 @@ static ssize_t at25ee_write(FAR struct mtd_dev_s *dev, off_t offset, /* Forbid writes past the end of the device */ - if (nbytes + offset >= priv->size) + if (nbytes + offset > priv->size) { return 0; }