From 2e50c869ac2cd4a55a79840d84dd19031bb92708 Mon Sep 17 00:00:00 2001
From: Thomas Faber <thfabba@gmx.de>
Date: Wed, 28 Mar 2012 13:30:08 +0200
Subject: 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 95570b6..fb580ab 100644
--- a/dlls/dbghelp/cpu_x86_64.c
+++ b/dlls/dbghelp/cpu_x86_64.c
@@ -292,6 +292,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;
@@ -299,6 +300,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 */
-- 
1.7.1.GIT
