diff options
| author | atkawa7 <atkawa7@yahoo.com> | 2018-01-21 12:48:37 +0200 |
|---|---|---|
| committer | atkawa7 <atkawa7@yahoo.com> | 2018-01-21 12:48:37 +0200 |
| commit | 751877f4e8141e99ca01225fe338ff328fb913d5 (patch) | |
| tree | 5f72e2eec4a0116746c780a655d8aa5bf29e4722 /ports/libdisasm/sizeofvoid.patch | |
| parent | c1d0597003fbf0b98dd6e6bfb1b86691258140da (diff) | |
| download | vcpkg-751877f4e8141e99ca01225fe338ff328fb913d5.tar.gz vcpkg-751877f4e8141e99ca01225fe338ff328fb913d5.zip | |
[libdisasm] init
Diffstat (limited to 'ports/libdisasm/sizeofvoid.patch')
| -rw-r--r-- | ports/libdisasm/sizeofvoid.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ports/libdisasm/sizeofvoid.patch b/ports/libdisasm/sizeofvoid.patch new file mode 100644 index 000000000..428c5616c --- /dev/null +++ b/ports/libdisasm/sizeofvoid.patch @@ -0,0 +1,29 @@ +diff --git a/x86_disasm.c b/x86_disasm.c +index 04574fa..177bfb8 100644 +--- a/x86_disasm.c ++++ b/x86_disasm.c +@@ -35,7 +35,7 @@ unsigned int x86_disasm( unsigned char *buf, unsigned int buf_len, + + if ( offset >= buf_len ) { + /* another caller screwup ;) */ +- x86_report_error(report_disasm_bounds, (void*)(long)buf_rva+offset); ++ x86_report_error(report_disasm_bounds, (void*)(long)(buf_rva+offset)); + return 0; + } + +@@ -53,13 +53,13 @@ unsigned int x86_disasm( unsigned char *buf, unsigned int buf_len, + + /* check and see if we had an invalid instruction */ + if (! size ) { +- x86_report_error(report_invalid_insn, (void*)(long)buf_rva+offset ); ++ x86_report_error(report_invalid_insn, (void*)(long)(buf_rva+offset)); + return 0; + } + + /* check if we overran the end of the buffer */ + if ( size > len ) { +- x86_report_error( report_insn_bounds, (void*)(long)buf_rva + offset ); ++ x86_report_error( report_insn_bounds, (void*)(long)(buf_rva + offset)); + MAKE_INVALID( insn, bytes ); + return 0; + } |
