Skip to content

Commit

Permalink
elf2dmp: limit print length for sign_rsds
Browse files Browse the repository at this point in the history
String sign_rsds isn't terminated, so the print length must be limited.

Fixes: Coverity CID 1521598
Signed-off-by: Viktor Prutyanov <viktor@daynix.com>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-id: 20230930235317.11469-2-viktor@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
viktor-prutyanov authored and pm215 committed Oct 19, 2023
1 parent b65b4b7 commit 8b01683
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/elf2dmp/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ static bool pe_check_pdb_name(uint64_t base, void *start_addr,
}

if (memcmp(&rsds->Signature, sign_rsds, sizeof(sign_rsds))) {
eprintf("CodeView signature is \'%.4s\', \'%s\' expected\n",
eprintf("CodeView signature is \'%.4s\', \'%.4s\' expected\n",
rsds->Signature, sign_rsds);
return false;
}
Expand Down

0 comments on commit 8b01683

Please sign in to comment.