Commit 15ca6c43 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Prevent crash in debugger.

parent f585c61d
...@@ -1036,15 +1036,22 @@ db_print_address(seg, size, addrp, byref) ...@@ -1036,15 +1036,22 @@ db_print_address(seg, size, addrp, byref)
} }
else { else {
/* try to get destination of indirect call) /* try to get destination of indirect call
works not for segmented adresses */ does not work for segmented adresses */
if (!seg && byref) { if (!seg && byref) {
DBG_ADDR dbg_addr = {0,0,*(LPDWORD)(addrp->disp)}; DBG_ADDR dbg_addr = {NULL, 0, 0};
fprintf(stderr,"0x%x -> ", addrp->disp);
if ( DEBUG_IsBadReadPtr( &dbg_addr, sizeof(DWORD))) dbg_addr.off = addrp->disp;
fprintf(stderr, "(invalid destination)"); fprintf(stderr,"0x%x -> ", addrp->disp);
else if (DEBUG_IsBadReadPtr( &dbg_addr, sizeof(LPDWORD))) {
db_task_printsym(dbg_addr.off, 0); fprintf(stderr, "(invalid source)");
} else {
dbg_addr.off = *(LPDWORD)(addrp->disp);
if (DEBUG_IsBadReadPtr( &dbg_addr, sizeof(DWORD)))
fprintf(stderr, "(invalid destination)");
else
db_task_printsym(dbg_addr.off, 0);
}
} }
else else
db_task_printsym(addrp->disp, size); db_task_printsym(addrp->disp, size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment