[PATCH 1/2] elf2dmp: limit print length for sign_rsds

Viktor Prutyanov posted 2 patches 2 years, 4 months ago
Maintainers: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
There is a newer version of this series
[PATCH 1/2] elf2dmp: limit print length for sign_rsds
Posted by Viktor Prutyanov 2 years, 4 months ago
From: Viktor Prutyanov <viktor.prutyanov@phystech.edu>

String sign_rsds isn't terminated, so the print length must be limited.

Signed-off-by: Viktor Prutyanov <viktor@daynix.com>
---
 contrib/elf2dmp/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
     }
-- 
2.21.0