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:
mark@chromium.org 2012-09-17 21:55:37 +00:00
parent 52935b4e81
commit 3682b31cbe

View file

@ -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,