From 58d3e359c4e73359c446b55cc9713299d7de55ad Mon Sep 17 00:00:00 2001 From: yellows8 Date: Wed, 10 Jun 2015 01:34:20 -0400 Subject: [PATCH] Print the found values with '%08x' instead of '%x'. --- ropgadget_patternfinder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ropgadget_patternfinder.c b/ropgadget_patternfinder.c index 9cee93f..ecb1974 100644 --- a/ropgadget_patternfinder.c +++ b/ropgadget_patternfinder.c @@ -335,7 +335,7 @@ int locate_pattern() tmpval+= addval; if(!plainout)printf("Found the pattern at(value added with 0x%x) ", addval); - printf("%s0x%x", line_prefix, tmpval); + printf("%s0x%08x", line_prefix, tmpval); if(!plainout)printf("."); } else @@ -346,12 +346,12 @@ int locate_pattern() if(!plainout) { printf("Found the pattern at "); - printf("%s0x%x", line_prefix, ((unsigned int)pos) + baseaddr); + printf("%s0x%08x", line_prefix, ((unsigned int)pos) + baseaddr); printf(", u32 value at +0x%x, value added with 0x%x: 0x%x.", dataload_offset, addval, tmpval); } else { - printf("%s0x%x", line_prefix, tmpval); + printf("%s0x%08x", line_prefix, tmpval); } }