* Convert symbol_t name member from char[R_BIN_MACH0_STRING_LENGTH] to char *
* Invert the variables that assmebles the ht key to ensure uniqueness
Long identiers will fill the key buffer with the first 256 chars of the
name and have the rest of the name and the addresss ignored. This can
lead to two different identifiers having the same key.
The first 256 characters of two different identifiers might be
identical, while their address won't. Therefore, to ensure different
identifiers will have different keys, we sholud first emmbed the part
that is ought to be unique in the identifier, the address, and only then
take the identifier itself into account.
* Add testcase
* Define variable outside of the for-loop block
* Remove redundant conditional free
* Replace sdb_fmt with r_str_newf
* Add missing format string argument and use r_str_newf
* Use NULL instead of 0 for name pointer
* Change last to bool and adjust rvalue accordingly
* Ensure we do not process empty an empty string
Co-authored-by: phakeobj <phakeobj@users.noreply.github.com>
* Fixed an issue when analyzing Objective C methods, `count` can be 0xffffffff in some places, which in turn can lead to integer overflow, causing radare2 to try and analyze the whole memory space, effectively causing it to hang.
Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
Co-authored-by: pancake <pancake@nowsecure.com>
* Moved dwarf prototypes to its header, added information for DWARF4
* Fixed incorrect line parsing for last compilation unit
* Added ability to parse DWARF4 and DWARF5 but without parsing out the source files
* Add missing reloc definitions for C-SKY, RISCV and AARCH64 ##bin
* Update glibc_elf.h from GNU's GIT
* Fix build EM_HEXAGON is now EM_QDSP6
* Dont include features.h because its a gnuism
Co-authored-by: pancake <pancake@nopcode.org>
* implment basic concept signature bestmatch
* bestmatch works without zignspace
* zb shows top n closet matches
* add tests for zb command
* return list from r_sign_find_closest_sig
Co-authored-by: Dennis Goodlett <dennis@hurricanelabs.com>
Co-authored-by: pancake <pancake@nowsecure.com>
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being created without a protocol
* Fix socket connect with SSL ##socket
* Use select() in r_socket_ready()
* Fix read failing if received only protocol answer
* Fix double-free
* r_socket_http_get: Fail if req. SSL with no support
* Follow redirects in r_socket_http_answer()
* Fix r_socket_http_get result length with R2_CURL=1
* Also follow redirects
* Avoid using curl for downloading PDBs
* Use r_socket_http_get() on UNIXs
* Use WinINet API on Windows for r_socket_http_get()
* Fix command injection
* Fix r_sys_cmd_str_full output for binary data
* Validate GUID on PDB download
* Pass depth to socket_http_get_recursive()
* Remove 'r_' and '__' from static function names
* Fix is_valid_guid
* Fix for comments
* Fix wrong computation in get_next_not_analysed_offset
* Uses virtual address in read_reloc and use elf_v2p to convert it to
the right offset in the file, instead of relying on base->baddr
directly. Dynamic info contain virtual address, not offsets.
* get_next_not_analyzed_offset should return the offset starting from
section_vaddr, to ensure the offset can never be decremented.
* use num_relocs to possibly limit the number of stored relocations
Using num_relocs works both as a defensive measure in case the initial
size computed by get_num_relocs_approx is wrong and as a way to limit
the number of relocation entries read by the parser, in case the
relocation section is so big that we can't allocate enough memory
(probably a fake section).
* Add support for AARCH64 reloc entries