Commit Graph

10547 Commits

Author SHA1 Message Date
BlueC0re
5d3c7d1d36 Added array size support for structures 2016-09-04 16:49:12 +02:00
Vlad Ivanov
1dbcdb3ca8 anal_xtensa: fix "callx0 a0" ESIL (#5689) 2016-09-04 14:24:13 +02:00
pancake
dad6847883 Add zG exact-match zignatures support 2016-09-04 14:13:08 +02:00
Álvaro Felipe Melchor
158d3fcc6b More ELFic works 2016-09-04 14:03:35 +02:00
pancake
07656c523b Fix #5684 - Add cfg.minzlen to force minimum length as valid zignatures 2016-09-04 14:02:27 +02:00
pancake
e3e95d1f4c Implement optimized zo command 2016-09-04 13:54:37 +02:00
pancake
e6324bcc62 Add zo command and fix build 2016-09-04 13:44:02 +02:00
Álvaro Felipe Melchor
4d82d3b3bb fix build 2016-09-04 13:43:31 +02:00
pancake
69cefa1442 More fixes for agv path discoverty 2016-09-04 13:31:37 +02:00
NighterMan
9f7ebda012 Fix for invalid JSON ouput on search cmd 2016-09-04 12:17:46 +02:00
pancake
6b5e4f151b Add core.breakLoop for 1000ds and fix 'ds #' 2016-09-04 01:05:14 +02:00
pancake
e4948d4c28 asm.emustr enables asm.emu automatically 2016-09-03 20:31:30 +02:00
pancake
dbffaeb602 Aim to fix the missing font tag issue in scr.html 2016-09-03 18:38:12 +02:00
pancake
b3ccf6387c More checks for agv 2016-09-03 17:57:30 +02:00
pancake
0db8170801 Fix latest covs 2016-09-03 17:26:56 +02:00
SkUaTeR
d5c0671a50 fixed esil STOSB opcode for 16 bits (#5676) 2016-09-03 17:08:21 +02:00
pancake
ea09d9df2b Fix pxr0 regression 2016-09-03 17:08:02 +02:00
Álvaro Felipe Melchor
41a584b91b cache symbols and imports from phdr 2016-09-03 16:58:36 +02:00
Álvaro Felipe Melchor
76d2e3e74f fix uaf introduced in faster load elf 2016-09-03 16:29:16 +02:00
pancake
320a4aad25 Fix #5573 - avoid bad names in functions after af 2016-09-03 14:57:59 +02:00
pancake
bd15b62ed0 Always run afva from af if anal.vars is set 2016-09-03 14:53:34 +02:00
pancake
8a4ac505b0 Fix #5665 - Properly handle 32/64 bit spawning on OSX 2016-09-03 14:39:43 +02:00
pancake
1ad646698e Add ?w and drop anal.vars check in afva command 2016-09-03 14:22:31 +02:00
Álvaro Felipe Melchor
bdd8708429 Load ELF files faster caching symbols and imports 2016-09-03 13:57:35 +02:00
pancake
c397cda15d Fix #5667 - Override SHDR symbols with PHDR ones 2016-09-03 05:05:25 +02:00
Maijin
34a1bdf23c Fix #5640 2016-09-02 22:27:24 +02:00
pancake
daacec5753 Fix #5668 - Honor =H arg path 2016-09-02 20:57:45 +02:00
pancake
90fee6d5dd Fix regression logic in agv and update help 2016-09-02 20:00:16 +02:00
pancake
7c0f154dea Fix #5627 - Iterate over all instructions with @@i 2016-09-02 18:11:56 +02:00
pancake
6b1a0677fd Revert "Remove agv fix #5662"
This reverts commit 1248617989.
2016-09-02 17:14:52 +02:00
pancake
90fb18dcfc Fix endian issue in mips.gnu assembler 2016-09-02 17:12:28 +02:00
Maijin
aab6ebf06b Remove afna false-positive 2016-09-02 16:48:25 +02:00
Maijin
48cbf32b88 Fix #5666 2016-09-02 14:15:05 +02:00
Maijin
1248617989 Remove agv fix #5662 2016-09-02 14:11:42 +02:00
Vlad Ivanov
19d4154e39 anal_xtensa: initial ESIL support 2016-09-01 22:50:28 +02:00
pancake
0a1e99ce04 Fix assemble() endianness for mips 2016-09-01 22:46:07 +02:00
pancake
4429de16f9 Fix pa/pad for big/lil endian 2016-09-01 22:34:28 +02:00
pancake
dc545c8102 Fix regression in rasm2 -e 2016-09-01 21:50:04 +02:00
Wladimir J. van der Laan
d8941295e6 Fix off-by-one error in afx- handling (#5664) 2016-09-01 21:02:38 +02:00
Tiago Gasiba
f0a2d8657d Add support for conditional breakpoints running r2 commands 2016-09-01 19:11:46 +02:00
pancake
e16773367f Aim to fix OSX crash after last rcons change 2016-09-01 17:12:06 +02:00
pancake
e18b2b81f1 Fix pdb regression and more syntax cleanup 2016-09-01 14:30:12 +02:00
pancake
945d6690f9 Fix latest coverities 2016-09-01 12:39:32 +02:00
pancake
0dab982923 Disable the uncolorful non-tty behaviour by default 2016-09-01 12:06:53 +02:00
pancake
697de91c86 Fix #5038 - Disable color when stdout is not in a terminal 2016-09-01 12:06:50 +02:00
Tiago Gasiba
d9cac5b3ff fix radare2-regressions/t.archos/Linux-x86_64/dbg_bps regressions (#5661) 2016-09-01 11:51:00 +02:00
pankajkataria
9fa781becc Add av* and avj to show vtables in r2 and json formats 2016-09-01 11:13:06 +02:00
pancake
722e568d66 Implement drb[1,2,4,8] 2016-08-31 11:25:18 +02:00
Tiago Gasiba
7a79e801ff Fix 5649 - afu documentation (#5659) 2016-08-31 10:32:54 +02:00
pancake
b1480739eb Add @@b iterator for all the basic blocks 2016-08-31 03:32:12 +02:00
pancake
1ef0944cf5 Fix #5657 - aap segfaults 2016-08-31 03:17:51 +02:00
pancake
82d42ba5b2 Fix build and basic run of the ios-arm64 debugger 2016-08-31 02:30:20 +02:00
pancake
12a6469bbd Various fixes for the debug register state on XNU for ARM and x86 2016-08-31 01:57:36 +02:00
pancake
71ba33e2ad Fix stack alignment bug in anal.arm64.esil 2016-08-30 23:41:09 +02:00
pancake
dc7d65c07a Extend arm64 regprofile for 16 and 8bit registers 2016-08-30 23:21:23 +02:00
Pau Oliva
bf6f4c5477 Add CPS-2 encryption support 2016-08-30 16:28:24 +02:00
Ahmed Mohamed Abd El-MAwgood
c474aa5a9f Fixing nasty bug in CC implementation (#5650)
That is not the kind of bug I see everyday
1- calling convention db is loaded
2- function cc types is initialized by project file, that string is only
one copy across the whole database for memory efficiency.
3- The db is reloaded due to change in arch or what ever, Old strings
are freed and new one is created with totally new address. Most cases it
just reload the same database.
4- Addresses in function cc types are not updates, they are already
freed at reloading db step

Solution implemented at db reloading step:
1- create new temp db with all possible available calling conventions and
the adresses in memory of these calling conventions
2- once db is reloaded, grab adress of cc from function, match it with
the name in the new temp db, then replace it with the constant value
from the newly loaded db
2016-08-30 15:47:04 +02:00
pancake
b95ab62f05 Fix #5646 - Division by zero in asm.hints 2016-08-30 15:44:52 +02:00
pancake
e04498ac02 Add rabin2 -X and r_bin_package for FAT and ZIP 2016-08-30 04:26:20 +02:00
BlueC0re
b11298b8f7 fix visual mark target address (#5637) 2016-08-29 20:20:10 +02:00
Ahmed Mohamed Abd El-MAwgood
912bc40327 Initial support for afta command 2016-08-29 20:19:05 +02:00
Riccardo Schirone
530ee2d06f bin: fix elf program header name INERP -> INTERP
core/cmd_print: update pf help message
2016-08-29 12:29:30 +02:00
Akihiko Odaki
2a64686981 Fix #5634: Use 32 bit calling convention for ARM Thumb 2016-08-29 11:39:50 +02:00
Akihiko Odaki
dbfd630927 Fix cc.arm64.name 2016-08-29 11:39:30 +02:00
pancake
673d3da145 Fix null deref in aftm 2016-08-29 01:20:05 +02:00
pancake
0d3595e83a Fix #5555 - Misleading in/out annotations for AVR 2016-08-29 01:12:05 +02:00
pancake
6d040b2f71 Syntax indentation fixes in mach0 and cbin 2016-08-29 01:09:10 +02:00
Sebastien Marie
4c7f2e722e r_sys_mkdir() is now a function instead of a macro to properly check the sandbox 2016-08-28 22:14:28 +02:00
Maijin
104c240d0a Add initial function list for osx-64 2016-08-28 21:35:31 +02:00
Tiago Gasiba
520106bac9 Fix #5556 - prints all hashes, even if have gap between the bits 2016-08-28 19:36:59 +02:00
Álvaro Felipe Melchor
84e871e456 Fix #5476 - fix UAF executing twice izz~:0 2016-08-28 17:36:18 +02:00
Tiago Gasiba
3e21569722 Fix dbic <num> <cmd> Arg parsing 2016-08-28 15:48:38 +02:00
Tiago Gasiba
1639113cb1 Fix swstep on x86-32 for UCALL/UJMP instructions 2016-08-28 13:56:29 +02:00
pancake
0e39492148 Make dalvik method/field names consistent again 2016-08-28 13:53:59 +02:00
Tiago Gasiba
e686af49aa Make !? help available via ?! 2016-08-28 13:41:06 +02:00
pancake
220a0b46bd Fix #5554 - Update !? help 2016-08-28 13:40:41 +02:00
Vlad Ivanov
9f55b79ca3 anal_xtensa: fix stack pointer definition in reg profile 2016-08-28 13:27:13 +02:00
pancake
0b32cf7c90 Fix recent regressions for DEX, fix entrypoints, {s,i}fields and lot of segfaults! 2016-08-28 13:19:04 +02:00
SkUaTeR
cc73f46ee3 fix overflow on reg sync (#5628) 2016-08-28 03:59:47 +02:00
Tiago Gasiba
3a7a46441e Fix swstep on call [addr] 2016-08-27 19:19:58 +02:00
pancake
7cf0e1b633 Fix r2pipe:// (initial \x00 issue and cmd chop messages properly) 2016-08-27 02:32:43 +02:00
Damien Zammit
e9e8ae3629 Bigendian fixes: DEX parser (#5588) 2016-08-27 01:34:45 +02:00
SkUaTeR
8b17834eb5 Fix command do in windows, fix dr command to get segments registers, … 2016-08-26 23:51:56 +02:00
Damien Zammit
3ae075cba9 rabin2: Fix check for binaries and as a result don't need to open twice (#5614) 2016-08-26 22:21:06 +02:00
Pankaj Kataria
16502dbe90 Updated av to fix recent regression 2016-08-26 22:12:13 +02:00
BlueC0re
40aa48681d Fix vmarks and save them in the project
removing deletion of marks after dump and using UT64_MAX as an unset flag throughout the code.
2016-08-26 21:35:10 +02:00
BlueC0re
6f314bf0db fix immediate base setting in visual mode 2016-08-26 20:02:02 +02:00
BlueC0re
0ad02a8afc fixed missing newline in graph help menu
Was almost hiding the function callgraph keybinding.
2016-08-26 20:01:31 +02:00
Phil
ee7216a117 Fix typos in cmd help msg 2016-08-26 20:01:15 +02:00
pancake
64d91ce2fb Add scr.color.bytes and rename scr.colorops to scr.color.ops 2016-08-25 20:31:45 +02:00
Jeffrey Crowell
0db6959c6d fixup grammar in r_debug_kill 2016-08-25 18:27:11 +00:00
pancake
30e3d06dbf Fix #4814 - Make asm.reloff less confusing and add experimental asm.reloff.flags 2016-08-25 20:17:55 +02:00
pancake
2670953678 Initial boolification of the DisasmOptions struct 2016-08-25 18:55:09 +02:00
zlowram
fb4a895d9a Fix #5571 - Add e asm.cmtrefs
Disabled by default. When enabled, it shows the flag and comment that is at the ref of the current instruction.
2016-08-25 18:41:49 +02:00
pancake
a74fed4fdf Fix infinite loop in r2 -e cfg.editor=- -c- -- 2016-08-25 17:46:08 +02:00
Rakholiya Jenish
c86010e702 pf indent fix and follow code standards (#5607) 2016-08-25 17:06:23 +02:00
Ahmed Mohamed Abd El-MAwgood
12ba06aab6 Fixing coverties in anal_tp.c (#5606)
CID 1361922
CID 1361920
2016-08-25 14:55:22 +02:00
Ahmed Mohamed Abd El-MAwgood
ee30afde45 Fixing infinite loop issue (#5601) 2016-08-25 11:26:35 +02:00
Wladimir J. van der Laan
59a03b7d9a Fix stack pointer tracking for POPCNT POPFD POPFQ (#5604)
- POPFD and POPFQ were not counted
- POPCNT is not a stack operation but counts the '1' bits in a word.
  Not sure where POPCNT belongs with it was wrong here.
2016-08-25 09:50:12 +02:00
Álvaro Felipe Melchor
7df4fc3ce4 Fix some coverities 2016-08-24 22:02:38 +02:00
pancake
a3ce21645e Fix infinite loop in afm 2016-08-24 16:47:41 +02:00
pancake
e3c8b637f6 Update help for 'af' and handle invalid af subcommands 2016-08-24 16:45:55 +02:00
Rakholiya Jenish
a461d53397 Implement stack based splitting of args
* stack based splitting of args
* fix r_str_rchr
2016-08-24 16:33:45 +02:00
Sebastien Marie
4c1b1b7481 make r_sys_truncate() obey to sandbox mode (#5594)
the diff corrects a logic error in `__WINDOWS__ && !__CYGWIN__` case, as
r_sandbox_open() will return `-1` on error.

and it makes a sandbox check before calling truncate(2) syscall.
2016-08-24 16:30:43 +02:00
Sebastien Marie
2e0434d211 spelling namepsace->namespace (#5596) 2016-08-24 16:30:23 +02:00
Álvaro Felipe Melchor
34c6e3e1a1 Fix #5543 - oob write in Sr command (#5598) 2016-08-24 00:23:14 +02:00
Wladimir J. van der Laan
da564f28ee Remove unused field addr from SymName 2016-08-24 00:01:40 +02:00
Wladimir J. van der Laan
fb196362e1 Handle NULL strings in r_bin_demangle (#5587) 2016-08-23 13:11:30 +02:00
Ahmed Mohamed Abd El-MAwgood
4a3c341ade Fixing more bugs in type matching (#5586)
* Fixing more bugs in type matching
* Adding functionality to restore ESIL env var state before aftm was issued
2016-08-23 13:10:15 +02:00
pancake
4f1c50f7f5 Code cleanup and reindent in visual/core 2016-08-23 03:02:23 +02:00
pancake
0b86c2ac55 Fix memleaks and r2pipe annoyance with izz 2016-08-23 01:39:16 +02:00
pancake
2f73865c5c Fix #5572 - show disasm in Vx and also fix build 2016-08-22 18:44:52 +02:00
pancake
fd0810fbf1 Fix memleaks in av, lot of anal code cleanup and do not always allocate bb->diff 2016-08-22 18:32:18 +02:00
Wladimir J. van der Laan
b68c345948 Add stackptr to aOj output (#5582)
It's 10:00 PM, do you know where your stack pointers are?
2016-08-22 18:07:15 +02:00
Joshua J. Drake
b526aded9c Don't restore breakpoints on STEP recoil (#5583)
As the comment says, we need to pretend to satisfy the caller. For some reason
I also restored the breakpoints here. I cannot for the life of me figure out
why since it should be ok with in all cases.

For swstep=false, the step will stop right away (regardless of any breakpoints)
and thus need to remove breakpoints anyway.

For swstep=true, a breakpoint is created on the next instruction and would stop
too and thus need to remove breakpoints anyway.

So yeah, don't do this. Thanks for the report skuater!
2016-08-22 17:13:13 +02:00
pancake
9a9e9326a5 Fix two null derefs in anal.var code 2016-08-22 14:52:27 +02:00
zlowram
97103102f4 Fixed warnings (#5579) 2016-08-22 13:26:35 +02:00
Alexandru Caciulescu
4bf045b5da Coverity patch + refactor (#5574) 2016-08-22 12:39:21 +02:00
Jaguar83
eb50b7edd1 Patch 1 (#5544)
* Bad Trap on MIPS ADDI ESIL
added $$ to TRAP as per ES_TRAP_DS

* Fixed ADDI logic

Based on QEMU, overflow occurs when the operands have the same sign, but the sign of the result is different.
2016-08-22 12:36:30 +02:00
pancake
59620e1364 Fixes in pf indent output. More to come 2016-08-22 12:33:42 +02:00
Rakholiya Jenish
18cd2f5ec5 anon pf struct and add n/N
add anon nested struct help and fix tests

fix tests

minor changes

add support for unsigned and signed char, short, int and long long

add help

cleanup

minor fix
2016-08-22 11:25:52 +02:00
Ahmed Mohamed Abd El-MAwgood
29bf4e2fe2 fixing bugs with tp (#5567)
- Fixing (type matching with esil into non initialized stack)

- FIXING CIDS in anal_tp.c and var.c

  - CID 1361741
  - CID 1361734
  - CID 1361731
2016-08-22 11:22:22 +02:00
Alexandru Caciulescu
d83779445d Update depgraph.pl script usage (#5577) 2016-08-22 11:22:13 +02:00
zlowram
8a08de39ec Improvements on zignatures generation and new mataching command
- Generation of zignatures were to specific to be useful. They were
generated by getting the first 128 bytes of the functions defined,
as is. Now, it generates more generic signatures by getting the
whole function bytes and masking out all the operands.

- New z. command, that performs zignature match by function. It
works for a given offset with @ addr, so with @@ fcn* it can be
run against all detected functions of the bin.
2016-08-22 10:48:56 +02:00
pancake
1a561b62ce Drop that speedup analysis 2016-08-21 12:10:44 +02:00
pancake
0016fb6d33 Add JAYRO_03 aac improvement (disabled for now) 2016-08-21 11:50:33 +02:00
pancake
2390075946 Try the JAYRO_04 patch to speedup analysis 2016-08-21 11:39:37 +02:00
pancake
5023918793 Add hotpatching function preludes from MSVC 2016-08-21 11:31:54 +02:00
Alexandru Caciulescu
43c99e4e6a Split ROP SDB per class (#5561) 2016-08-21 10:21:44 +02:00
pancake
56844d68f3 Rollback the tinyrange optimization 2016-08-21 03:07:19 +02:00
pancake
1bdb2c9f93 Add and use tinyrange.c: get 10% speedup in analysis 2016-08-21 01:41:03 +02:00
pancake
bab8d67c5e Add @@f foreach iterator to walk all the functions 2016-08-21 00:25:03 +02:00
Rakholiya Jenish
f3085dd3e4 remove %hh usage 2016-08-19 19:58:38 -04:00
Ahmed Mohamed Abd El-MAwgood
4c60a11f7e Types docs (#5557)
* Adding types documentation

* refactoring and optimizing types databases

All based on docs

* fixing r_core_types_init

Basically we needed to try all possible 7 combinatios of file name,
I am not sure if there is a way to do that automatically.
one extra thing, since this is init subroutine we should make sure
that the db is already empty, when reloading this function
(by changing env vars), it will be reloaded thus it needs a reset first.
2016-08-19 14:31:41 -04:00
pancake
22b78d5c73 afn without arg show current function name 2016-08-19 14:15:10 +02:00
pancake
b5d1bbf333 Fix afn without argument issue 2016-08-19 14:13:57 +02:00
pancake
e0e15baa6c 2x speedup in objc mach0 parsing with memoication 2016-08-19 13:53:11 +02:00
pancake
d779aa3352 Fix debrujn format strings 2016-08-19 12:58:07 +02:00
pancake
c6d76d52b2 Fix #5562 - Only STACK_INC and RESET changes stackptr 2016-08-19 12:49:17 +02:00
Pau Oliva
3f2b2a1726 Fix endianness issues in CPS-2 decryption 2016-08-19 12:04:53 +02:00
Sebastien Marie
e0ee8cdefa update native sandboxing method for OpenBSD (#5545)
move from systrace(4) (removed in 6.0 release) to pledge(2) (available
since 5.9).
2016-08-18 15:59:36 +02:00
Mitchell Johnson
7661c3930a Add a missing MSP430 constant register instruction encoding (#5548)
* Fix a missing #1 constant-generator encoding for msp430
* Fix up some tab/space mixing
2016-08-18 15:58:38 +02:00
Pau Oliva
52ce3359a8 fix set_key return value in crypto_cps2 (#5552) 2016-08-18 14:48:31 +02:00
Ahmed Mohamed Abd El-MAwgood
8e23885816 adding option load types manually (#5550) 2016-08-18 10:52:20 +02:00
leberus
74e6fda450 Coredump support for ARM and fix-ups (#5549)
* Fixes: 5540 (now i386 will not complain in case they're missing GETREGSET)
 * Fixup: Owner set to Linux for NT_PRXFPREG
 * Fixup: Now extra section hdr is being written with the right offset
 * Fixup: Bug with multithread cfg fixed
 * Add: Now r2 is able to generate coredumps on ARM platforms
2016-08-18 10:43:08 +02:00
pancake
a877693dc7 Fix issue with silly compilers 2016-08-18 02:25:43 +02:00
pancake
b5febd2690 Add pP in Vv with afi, pds, pdc, pdr, pdf 2016-08-18 01:27:24 +02:00
pancake
38b1aedb03 Fix infinite loop in aftm 2016-08-18 01:27:11 +02:00
pancake
9021789382 Fix #5546 - Implement Vv[JK] to scroll pages of functions 2016-08-18 00:29:11 +02:00
Philip Grohe
34dea157f0 Edit stack.size description for clarity (Fix #5542)
Remove mention of anotated stack from description of stack.size configurable.  stack.size applies regardles of value of stack.anotat

Fix for issue 5541
2016-08-17 09:09:19 -04:00
Maijin
b9ae1d9dc6 Add aO Description 2016-08-17 00:51:49 -04:00
pancake
4eafce512f Remove noisy printf for mach0 2016-08-16 19:54:29 +02:00
Alexandru Caciulescu
c647c23182 Adding ArithmeticConst pattern (#5531) 2016-08-16 19:41:58 +02:00
pancake
fb7ecedf73 Add edges and ebbs info in function 2016-08-16 19:35:25 +02:00
pancake
123d1f1964 Fix android-x86 build 2016-08-16 19:27:55 +02:00
Jeffrey Crowell
57b357fb0a eprintf on pattern that is longer than we can do
closes  #5513
2016-08-16 15:43:08 +00:00
@bezjaje
1cab8b93b6 arj with flags quick fix (#5538) 2016-08-16 17:42:42 +02:00
Inndy
58a58574e1 Fix null defrefs and memory leak in var_cmd 2016-08-16 17:35:33 +02:00
pancake
0b4c00440a Remove some unused vars from the ms demangler 2016-08-16 14:46:32 +02:00
Damien Zammit
8efaec0832 Big Endian fixes, mainly for ELF (WIP) (#5535) 2016-08-16 14:22:26 +02:00
pancake
9620e0e992 Rest has_description in the right places 2016-08-16 13:54:59 +02:00
pancake
f5f923aea5 Fix all latest COVs 2016-08-16 13:39:59 +02:00
pancake
33e9766140 Fix #5248 - Do not show asm.describe if IO desc is found already 2016-08-16 13:39:56 +02:00
pancake
ed4e5afbbb Load types and cc info on asm.arch change 2016-08-16 11:59:34 +02:00
pancake
3be9aa12be Workaround for the anal op.size capstone problem 2016-08-16 11:59:27 +02:00
pancake
bf7a6fa973 Refix #5526 - Use f.** to save all function flags 2016-08-16 11:59:07 +02:00
pancake
d76dfbfd5d Fix #5533 - Honor ^C in aftm 2016-08-16 11:59:03 +02:00
pancake
796a03d8b4 Fix #5533 - Fix aftm segfault 2016-08-16 11:59:01 +02:00
pancake
273964a27c Fix two null derefs pointed out by Coverity 2016-08-16 03:26:26 +02:00
pancake
acae6fc188 Fix COV 1361613 2016-08-16 03:22:14 +02:00
SkUaTeR
83266a0a4e Add socket timeout on windows connect 2016-08-16 03:19:15 +02:00
pancake
70c9face23 Properly fix the esil regression 2016-08-16 03:17:36 +02:00
pancake
fe938ae91d Fix infinite loop issue in esil expressions with ,, 2016-08-16 02:52:37 +02:00
pancake
63ef956a75 Fix #5522 - rap:// write operation wrongly processed 2016-08-16 02:42:27 +02:00
pancake
dfebbd6252 Fix #4928 - Show string context in /z 2016-08-16 01:49:32 +02:00
pancake
026ccc7202 Add help for VV_ and VVF 2016-08-16 01:37:38 +02:00
pancake
2498a61ebe Fix #5524 - Add 'F' and '_' in graph 2016-08-16 01:32:44 +02:00
pancake
533d325cdc Speedup RCons.hud 2016-08-16 01:32:31 +02:00
pancake
fbdbd09b26 Support cfg.big_endian in pxd 2016-08-16 01:18:44 +02:00
pancake
b5e57379cd Implement pxd8 and fix warnings 2016-08-16 01:14:02 +02:00
pancake
61b7f4af37 Fix #4195 - Remove r_cons dependency from r_flags 2016-08-16 00:59:31 +02:00
dx
4b263b3475 Fix a handful of boring leaks (#5518)
Valgrinding to get exp. Testing with "r2 -Aqcq /bin/ls"

Before:

       definitely lost: 22,735 bytes in 250 blocks
       indirectly lost: 23,542 bytes in 605 blocks
         possibly lost: 2,464 bytes in 7 blocks
       still reachable: 3,876,216 bytes in 80,761 blocks

After:

       definitely lost: 25,216 bytes in 58 blocks
       indirectly lost: 24,830 bytes in 739 blocks
         possibly lost: 0 bytes in 0 blocks
       still reachable: 20,105 bytes in 34 blocks

The "goto beach" (named like that for consistency) change resulted in
freeing most of the "still reachable" stuff on quit, which also moved
stuff out of "possibly lost", so.. it looks like it's leaking more now.
Yay.
2016-08-16 00:45:33 +02:00
radare
93cb2941d3 Merge pull request #5527 from crorvick/cr/fix-backward-seek
Fix backward seek
2016-08-16 00:40:59 +02:00
Alexandru Caciulescu
bc5eff1a16 Fix false positives for LoadConst + optimize Nop pattern (#5515) 2016-08-16 00:40:17 +02:00
Chris Rorvick
9b47635f0c remove `next' param from r_core_block_read()
This was originally used to cause a seek to the next block prior to
reading such that successive calls to r_core_block_read() would progress
through memory one block at a time.  This was broken, though, by commit
452669d941 ("more cleanup in r_core_block_read") when when it used
`next' to directly calculate the offset rather than via a seek.

Only one call site remains that attempts to read the next block instead
of the current, and this probably was not even observable due to the
"hacky fix" added in commit 3bfa61946e ("Cleaner pvj, fix tinype load,
and honor 'ao N's").

The current of semantics of `next' appear to be broken and there is very
little dependence on it.  If the original behavior should be restored
anywhere, it would be much better to add a new function, or just do the
seek explicitly, rather than parameterizing r_core_block_read() on it.
2016-08-15 14:26:58 -05:00
Chris Rorvick
97cea63435 fix backwards seek
Commit 57b199789d ("Reread block after undo seek. Fixes dbg.status
issue") reads the *next* block into the buffer rather than the current.
This breaks backwards seeking as can be seen in the following example:

  $ r2 -N malloc://0x4000
  [0x00000000]> b 64
  [0x00000000]> wb 38
  [0x00000000]> s 64
  [0x00000040]> wb deadbeef
  [0x00000040]> s-32
  [0x00000020]> px
  - offset -   0 1  2 3  4 5  6 7  8 9  A B  C D  E F  0123456789ABCDEF
  0x00000020  dead beef dead beef dead beef dead beef  ................
  0x00000030  dead beef dead beef dead beef dead beef  ................
  0x00000040  0000 0000 0000 0000 0000 0000 0000 0000  ................
  0x00000050  0000 0000 0000 0000 0000 0000 0000 0000  ................
  [0x00000020]> s+16
  [0x00000030]> px
  - offset -   0 1  2 3  4 5  6 7  8 9  A B  C D  E F  0123456789ABCDEF
  0x00000030  3838 3838 3838 3838 3838 3838 3838 3838  8888888888888888
  0x00000040  dead beef dead beef dead beef dead beef  ................
  0x00000050  dead beef dead beef dead beef dead beef  ................
  0x00000060  dead beef dead beef dead beef dead beef  ................

The first block to a string of ASCII '8' bytes and the second to
0xdeadbeef.  We then seek backwards 32 bytes from our current 64 byte
offset but a dump at the resulting offset shows data from half way into
the second block (i.e., offset 0x60.)  Dumping again after seeking 16
bytes forward shows the expected last bit of the first block.  Clearly
the intent was to reread the current block, not the next block, after an
undo or backward seek.

NOTE: The above example will only work after applying the previous
commit as rereading the buffer when displaying the prompt hides this
bug.

Additionally, since the commit intended to reread the buffer only after
an undo seek, do not do this at all on a backward seek.
2016-08-15 14:00:39 -05:00
Pankaj Kataria
ad3034067e Added av command for listing virtual tables 2016-08-15 20:57:56 +02:00
Rakholiya Jenish
62b1e431c0 Fix pf for . and : 2016-08-15 20:55:52 +02:00
pancake
f671097ea7 Fix #5526 - Save function local flags in projects 2016-08-15 20:47:46 +02:00
Chris Rorvick
486fd32949 remove hacky fix
Commit 3bfa61946e ("Cleaner pvj, fix tinype load, and honor 'ao N's
help") added a hack to reread the current block when printing the
prompt.  This has the drawback of causing scripts loaded via the `-i'
command line option to potentially behave differently than reading the
commands via stdin.  Remove the hack and fix the bugs.
2016-08-15 13:06:07 -05:00
Ahmed Mohamed Abd El-MAwgood
213c6f29d1 Fixing some aftm bugs and null dereferences (#5521) 2016-08-15 17:34:12 +02:00
Ahmed Mohamed Abd El-MAwgood
d0fb42aa46 Fixing Invalid address at var display (#5523) 2016-08-15 17:33:27 +02:00
Ahmed Mohamed Abd El-MAwgood
12dbe30cbb Fixing coverity CIDs (#5516)
fix CID 1361617
Resource leaks (RESOURCE_LEAK)
/libr/core/tp.c: 148 in stack_clean()
 Var iable "str" going out of scope leaks the storage it points to.

fix CID 1361612
Null pointer dereferences (NULL_RETURNS)
/libr/core/tp.c: 178 in r_anal_type_match()
Dereferencing a null pointer "op".

fix CID 1361611
/libr/anal/var.c: 112 in r_anal_var_retype()
/libr/anal/var.c: 125 in r_anal_var_retype()
Dereferencing a null pointer "fcn".

fix CID 1361610
Incorrect expression (IDENTICAL_BRANCHES)
/libr/core/cmd_anal.c: 1616 in __anal_reg_list()
Dereferencing null pointer "fcn".
2016-08-15 09:54:25 +02:00
pancake
55a76c29e6 Fix iV tests 2016-08-15 09:53:15 +02:00
Ahmed Mohamed Abd El-MAwgood
397790250c Update types databases 2016-08-15 08:50:46 +02:00
Daniel L. Polanco
97f3a46100 Add final dll mfc90u to close issue 5486 (#5514)
This is an empty file because I (DanTheColoradan) was unable to
obtain any ordinal information. I tried two versions:

-  9.0.30729.1
-  9.0.30729.6161

Both were downloaded from dll-files.com. I also tried a version
from MS Windows 10, but I don't know what version it was.

This change should close #5486.
2016-08-14 22:42:45 -04:00
pancake
e33a6acbe7 Fix version info section sizes 2016-08-15 03:09:27 +02:00
pancake
c35666ef8a Minor rap:// fixes. More to come 2016-08-15 02:37:45 +02:00
pancake
771acc81f6 Fix huge load times for fuzzed versioninfo bins 2016-08-15 02:37:24 +02:00
pancake
0f39a486f5 Fix #5341 - rap:// with no file works now 2016-08-15 01:54:53 +02:00