You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/10/12 04:29:17 UTC
(nuttx) 04/20: modlib:fix bug when read modlib sections name
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 4ec4c5e1b464cf7a3121ce8503755fd4ab39877c
Author: anjiahao <an...@xiaomi.com>
AuthorDate: Tue Jul 2 15:18:04 2024 +0800
modlib:fix bug when read modlib sections name
Signed-off-by: anjiahao <an...@xiaomi.com>
---
libs/libc/modlib/modlib_sections.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/libc/modlib/modlib_sections.c b/libs/libc/modlib/modlib_sections.c
index 25f99736f2..cae9db2bfe 100644
--- a/libs/libc/modlib/modlib_sections.c
+++ b/libs/libc/modlib/modlib_sections.c
@@ -119,7 +119,7 @@ static inline int modlib_sectname(FAR struct mod_loadinfo_s *loadinfo,
/* Read that number of bytes into the array */
- ret = modlib_read(loadinfo, buffer, readlen, offset);
+ ret = modlib_read(loadinfo, buffer, readlen, offset + bytesread);
if (ret < 0)
{
berr("ERROR: Failed to read section name: %d\n", ret);