You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/04/01 12:19:48 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #5951: modlib/modlib_bind:fix unsigned_compare with zero

pkarashchenko commented on a change in pull request #5951:
URL: https://github.com/apache/incubator-nuttx/pull/5951#discussion_r840529135



##########
File path: libs/libc/modlib/modlib_bind.c
##########
@@ -297,7 +297,7 @@ static int modlib_relocate(FAR struct module_s *modp,
 
       /* Calculate the relocation address. */
 
-      if (rel->r_offset < 0 ||
+      if (rel->r_offset ||
           rel->r_offset > dstsec->sh_size - sizeof(uint32_t))

Review comment:
       should we then?
   ```suggestion
             rel->r_offset + sizeof(uint32_t) > dstsec->sh_size)
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org