aboutsummaryrefslogtreecommitdiff
path: root/ports/libdisasm/sizeofvoid.patch
blob: 1e4e008fc482681a04075678e419261f1433edc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--- a/libdisasm/x86_disasm.c
+++ b/libdisasm/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;
 	}