aboutsummaryrefslogtreecommitdiff
path: root/ports/libdisasm/sizeofvoid.patch
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-01-23 07:23:49 -0800
committerGitHub <noreply@github.com>2018-01-23 07:23:49 -0800
commitac509ecbe50ba8e7f2ef12c538ed643440ed7c03 (patch)
tree6d36ba1da444310cef0def4d792f8adaec9d030e /ports/libdisasm/sizeofvoid.patch
parent65ee81b1a25d5c9b0d666bdc651d903628118a25 (diff)
parent751877f4e8141e99ca01225fe338ff328fb913d5 (diff)
downloadvcpkg-ac509ecbe50ba8e7f2ef12c538ed643440ed7c03.tar.gz
vcpkg-ac509ecbe50ba8e7f2ef12c538ed643440ed7c03.zip
Merge pull request #2620 from atkawa7/libdisasm
[libdisasm] init
Diffstat (limited to 'ports/libdisasm/sizeofvoid.patch')
-rw-r--r--ports/libdisasm/sizeofvoid.patch29
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;
+ }