Eric Pouech : winedbg: Don't access inside a bp structure if it' s not initialized.

Alexandre Julliard julliard at winehq.org
Thu Aug 26 11:42:03 CDT 2010


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

Author: Eric Pouech <eric.pouech at orange.fr>
Date:   Wed Aug 25 21:43:52 2010 +0200

winedbg: Don't access inside a bp structure if it's not initialized.

Spotted by Peter Urbanec.

---

 programs/winedbg/break.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/programs/winedbg/break.c b/programs/winedbg/break.c
index b1cef6a..2f502ce 100644
--- a/programs/winedbg/break.c
+++ b/programs/winedbg/break.c
@@ -510,11 +510,13 @@ void break_delete_xpoints_from_module(DWORD64 base)
 
     for (i = 0; i < dbg_curr_process->next_bp; i++)
     {
-        linear = (DWORD_PTR)memory_to_linear_addr(&bp[i].addr);
-        if (bp[i].refcount && bp[i].enabled &&
-            im.BaseOfImage <= linear && linear < im.BaseOfImage + im.ImageSize)
+        if (bp[i].refcount && bp[i].enabled)
         {
-            break_delete_xpoint(i);
+            linear = (DWORD_PTR)memory_to_linear_addr(&bp[i].addr);
+            if (im.BaseOfImage <= linear && linear < im.BaseOfImage + im.ImageSize)
+            {
+                break_delete_xpoint(i);
+            }
         }
     }
 }




More information about the wine-cvs mailing list