Skip to content

Commit

Permalink
Merge pull request #130 from cooljeanius/autofix/alert-683-d616f5a220
Browse files Browse the repository at this point in the history
Fix code scanning alert no. 683: Suspicious add with sizeof
  • Loading branch information
cooljeanius authored Oct 4, 2024
2 parents 2ac66a5 + 4533aff commit b9570fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gdb/solib-frv.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ fetch_loadmap (CORE_ADDR ldmaddr)
memcpy (ext_ldmbuf, &ext_ldmbuf_partial, sizeof ext_ldmbuf_partial);

/* Read the rest of the loadmap from the target: */
if (target_read_memory((ldmaddr + sizeof(ext_ldmbuf_partial)),
(gdb_byte *)(ext_ldmbuf + sizeof(ext_ldmbuf_partial)),
if (target_read_memory(((gdb_byte *)ldmaddr + sizeof(ext_ldmbuf_partial)),
((gdb_byte *)ext_ldmbuf + sizeof(ext_ldmbuf_partial)),
(ext_ldmbuf_size - sizeof(ext_ldmbuf_partial))))
{
/* Failed to read rest of the loadmap: */
Expand Down

0 comments on commit b9570fc

Please sign in to comment.