Steven Morgan
48692affad
bytecode_vm.c: fix compiler warning and reduce debug verbosity.
2016-05-09 13:53:40 -04:00
Mickey Sola
46a35abe56
mass update of copyright headers
2015-09-17 13:41:26 -04:00
Shawn Webb
cd94be7a52
Silence a bunch of compiler warnings in libclamav
2014-07-10 18:11:49 -04:00
Shawn Webb
60d8d2c352
Move all the crypto API to clamav.h
2014-07-01 19:38:01 -04:00
Kevin Lin
612629994c
removed comments and unused variables in bytecode interpreter
2014-03-04 10:23:57 -05:00
Kevin Lin
5db992809c
fixed an issue with memory intrinsic return values
2014-02-28 16:35:47 -05:00
Shawn Webb
b2e7c931d0
Use OpenSSL for hashing.
2014-02-08 00:31:12 -05:00
Kevin Lin
08fef61fea
marked integer constants too large for long type with ULL
2014-01-24 15:34:40 -05:00
Kevin Lin
c7b17b3bd3
removed an unused variable
2014-01-22 10:56:13 -05:00
Kevin Lin
90c0acc762
formatted a number of bytecode files, converted tabs to spaces
2014-01-16 17:57:40 -05:00
Kevin Lin
1aa8768db2
fixed an issue where GEP with negative offset would invalidate pointer
2014-01-16 17:56:12 -05:00
Shawn Webb
241e7eb147
bb6258 - Add warnings when allocations fail
2013-03-01 13:51:15 -05:00
Ryan Pentney
e0cab69069
Fixed signed division check as in BB#6482
2013-01-25 11:52:03 -08:00
Török Edvin
c9e456b21c
fix opcode 20 error (bb #3100 )
2011-07-25 16:10:54 +03:00
Török Edvin
7493b2f383
Fix previous commit.
...
it wants 32-bit arg for memcpy...
2011-01-20 16:55:10 +02:00
Török Edvin
ecedf8a9f9
bytecode_vm: fix memset on bigendian arch (bb #2478 ).
...
Otherwise memset's count is always 0, and we are using uninitialized bytes,
causing bytecode to misbehave.
2011-01-20 16:10:30 +02:00
Török Edvin
9eb82c24c8
bytecode_vm: fix apicall8
...
memstr() curiously always had haystack == needle for bytecode.
To fix this it helps if I actually read arg3 from ops[2] instead of ops[0]!
2010-10-18 11:02:52 +03:00
Török Edvin
a15fc904ed
bytecode_vm: fix cli_bcapi_get_pe_section and cli_bcapi_disasm_x86.
...
They were not working on the interpreter, interpreter was seeing bounds errors
where there weren't any.
The 2nd parameter is a count, not a pointer size, the pointer's size
is a constant. Override the size for now.
2010-10-18 10:48:19 +03:00
Török Edvin
1c00d0ac74
bytecode_vm: record errors as bytecode events too
2010-10-18 10:48:19 +03:00
Török Edvin
2cad69f723
bytecode_vm: restore stack_id after function return
...
This allows pointers to local stack variables to work correctly after a call.
Previously stackid was not restored, which caused bytecode_vm to stop bytecodes,
claiming it overrun the stack, when in fact it didn't.
(stackid stores stack size).
2010-10-18 10:48:19 +03:00
Török Edvin
598d7edae0
Fix use of uninitialized value (bb #2140 ).
...
This bug may cause crashes in certain cases.
2010-07-23 22:32:46 +03:00
Török Edvin
2545f9767c
Rearrange some fields in structs to avoid holes.
2010-06-09 13:44:29 +03:00
Török Edvin
f85ae23af3
Fix bswap64 in bytecode interpreter.
2010-05-14 10:41:28 +03:00
Török Edvin
9d39dc93f3
Fix bytecode interpreter nullptr comparisons.
2010-05-13 23:16:08 +03:00
Török Edvin
7ebca3d717
Fix interpreter on new bytecode API tests.
2010-05-13 22:44:41 +03:00
Török Edvin
e4a0f2c94f
fix compiler warnings (bb #1872 , bb #1934 , bb #1935 )
2010-04-13 16:19:47 +03:00
Török Edvin
349e6e118b
More interpreter fixes, pdf.cbc seems to be running now.
2010-03-30 00:04:38 +03:00
Török Edvin
b9697ed80c
Fix OP_BC_GEPZ/OP_BC_GEP1 in interpreter.
...
It helps if the interpreter actually increments the variable by a non-zero
amount.
2010-03-30 00:04:38 +03:00
Török Edvin
44e134312c
More fixes for pdf.cbc.
2010-03-30 00:04:38 +03:00
Török Edvin
1678ef9e43
Fix inflate.cbc for the interpreter.
2010-03-29 11:38:52 +03:00
Török Edvin
15fd260a83
Only show all the trace/debug messages in --enable-debug mode.
...
This speeds up build of bytecode_vm.c, and makes the binary smaller.
2010-03-28 23:49:25 +03:00
Török Edvin
0d9b99f43e
Fix bswap.cbc in interpreter mode.
2010-03-28 23:49:25 +03:00
Török Edvin
7f6b55a124
Downgrade some messages to debug.
2010-03-24 17:55:04 +02:00
Török Edvin
48fc8b9852
Leak testcase.
2010-03-24 14:14:33 +02:00
Török Edvin
145ca5cb73
Fix distcheck.
2010-03-24 12:49:23 +02:00
Török Edvin
5dfb4bf136
match_with_read appears to be working!
2010-03-24 11:29:56 +02:00
Török Edvin
50829fbf12
Fix read of pedata in interpreter.
2010-03-24 10:41:11 +02:00
Török Edvin
0dd40a5490
Fix OP_BC_COPY.
2010-03-24 10:16:41 +02:00
Török Edvin
1c7c61941c
Fix GEPZ.
2010-03-24 00:07:17 +02:00
Török Edvin
4993d6cf02
Making progress on match_with_read.
2010-03-23 23:46:58 +02:00
Török Edvin
74f5816c58
Interpreter fixes for accessing 'ctx'.
...
This allow all cbcs in unit_tests/input to pass.
Not yet working on bytecode.cvd though.
2010-03-23 21:47:57 +02:00
Török Edvin
9aa1d72591
Fix distcheck errors.
2010-03-22 13:00:23 +02:00
Török Edvin
c6c464e590
Fix clambc.
2010-03-22 12:53:48 +02:00
Török Edvin
52d0d8bc7e
More fixes for global vars in the interpreter.
2010-03-22 11:18:28 +02:00
Török Edvin
9cbece5ccd
WiP fixing globals in interpreter.
2010-03-22 11:18:28 +02:00
Török Edvin
8596e2785a
Switch interpreter to debug mode by default.
...
This does more sanity checks.
2010-03-17 19:34:45 +02:00
Török Edvin
7a5e93a081
missing opcode.
2010-03-06 17:38:42 +02:00
Török Edvin
bc157ce357
prepare for reading globals from ctx
2010-03-06 16:00:54 +02:00
Török Edvin
18204a6726
READN -> READNfrom
2010-03-06 15:58:35 +02:00
Török Edvin
df5c921d3a
READ1,8,16,32,64->READN
2010-03-06 15:54:14 +02:00