diff options
author | mark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-09-17 21:55:37 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-09-17 21:55:37 +0000 |
commit | 3682b31cbe43700d654dcc85cddd206615ddc449 (patch) | |
tree | 0ec428c3c46f333e1910b7ac852c38d1f5c5449e /src | |
parent | Add a GetInstructionPointer method to MinidumpException (diff) | |
download | breakpad-3682b31cbe43700d654dcc85cddd206615ddc449.tar.xz |
Change an always true comparison to another conditional. Since
next_offset is unsigned, comparing it >= 0 is always true. Instead,
compare the numbers whose difference makes next_offset.
Patch by Richard Trieu.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1040 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src')
-rw-r--r-- | src/third_party/libdisasm/x86_disasm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/third_party/libdisasm/x86_disasm.c b/src/third_party/libdisasm/x86_disasm.c index 04574fa0..d6b7f810 100644 --- a/src/third_party/libdisasm/x86_disasm.c +++ b/src/third_party/libdisasm/x86_disasm.c @@ -165,7 +165,7 @@ unsigned int x86_disasm_forward( unsigned char *buf, unsigned int buf_len, if (next_addr != -1 ) { next_offset = next_addr - buf_rva; /* if offset is in this buffer... */ - if ( next_offset >= 0 && + if ( next_addr >= buf_rva && next_offset < buf_len ) { /* go ahead and disassemble */ count += x86_disasm_forward( buf, |