This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit b22549470a3dd40cbf7999d4a687e42fcae1746e
Author: yinshengkai <[email protected]>
AuthorDate: Thu Dec 12 16:30:27 2024 +0800

    note: avoid data loss when reading binary data
    
    If there is not enough space left when reading data, data will be lost.
    
    Signed-off-by: yinshengkai <[email protected]>
---
 drivers/note/noteram_driver.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/note/noteram_driver.c b/drivers/note/noteram_driver.c
index 7618ddea5d3..1adee91b947 100644
--- a/drivers/note/noteram_driver.c
+++ b/drivers/note/noteram_driver.c
@@ -403,10 +403,6 @@ static ssize_t noteram_get(FAR struct noteram_driver_s 
*drv,
 
   if (buflen < notelen)
     {
-      /* Skip the large note so that we do not get constipated. */
-
-      drv->ni_read = noteram_next(drv, read, NOTE_ALIGN(notelen));
-
       /* and return an error */
 
       return -EFBIG;

Reply via email to