summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorViktor Prutyanov <viktor@daynix.com>2023-10-01 02:53:16 +0300
committerPeter Maydell <peter.maydell@linaro.org>2023-10-19 14:32:12 +0100
commit8b01683e857a80425ea67dc44505b4983fc11a8e (patch)
treedc6fea582fd096866ef786bde876b28d407c2147
parentb65b4b7ae3c873dc2f8f4ce65ea5cedc45be3938 (diff)
downloadfocaccia-qemu-8b01683e857a80425ea67dc44505b4983fc11a8e.tar.gz
focaccia-qemu-8b01683e857a80425ea67dc44505b4983fc11a8e.zip
elf2dmp: limit print length for sign_rsds
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>
-rw-r--r--contrib/elf2dmp/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c
index 5db163bdbe..6de5c9808e 100644
--- a/contrib/elf2dmp/main.c
+++ b/contrib/elf2dmp/main.c
@@ -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;
     }