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
This commit is contained in:
parent
52935b4e81
commit
3682b31cbe
1 changed files with 1 additions and 1 deletions
2
src/third_party/libdisasm/x86_disasm.c
vendored
2
src/third_party/libdisasm/x86_disasm.c
vendored
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue