Thomas Faber : dbghelp: Fix uninitialized variable usage.

Alexandre Julliard julliard at winehq.org
Wed Mar 28 12:47:08 CDT 2012


Module: wine
Branch: master
Commit: 9f0119a0c07cd52bbac31706f80db5f71524977c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9f0119a0c07cd52bbac31706f80db5f71524977c

Author: Thomas Faber <thfabba at gmx.de>
Date:   Wed Mar 28 13:30:08 2012 +0200

dbghelp: Fix uninitialized variable usage.

---

 dlls/dbghelp/cpu_x86_64.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/dbghelp/cpu_x86_64.c b/dlls/dbghelp/cpu_x86_64.c
index 711c78c..29f4c6f 100644
--- a/dlls/dbghelp/cpu_x86_64.c
+++ b/dlls/dbghelp/cpu_x86_64.c
@@ -313,6 +313,7 @@ static BOOL is_inside_epilog(struct cpu_stack_walk* csw, DWORD64 pc,
             }
             return FALSE;
         case 0x83: /* add $n,%rsp */
+            if (!sw_read_mem(csw, pc + 2, &op2, 1)) return FALSE;
             if (op0 == 0x48 && op2 == 0xc4)
             {
                 pc += 4;
@@ -320,6 +321,7 @@ static BOOL is_inside_epilog(struct cpu_stack_walk* csw, DWORD64 pc,
             }
             return FALSE;
         case 0x8d: /* lea n(reg),%rsp */
+            if (!sw_read_mem(csw, pc + 2, &op2, 1)) return FALSE;
             if (op0 & 0x06) return FALSE;  /* rex.RX must be cleared */
             if (((op2 >> 3) & 7) != 4) return FALSE;  /* dest reg mus be %rsp */
             if ((op2 & 7) == 4) return FALSE;  /* no SIB byte allowed */




More information about the wine-cvs mailing list