rizin/test/unit
Luca Borzacchiello 616bfd94d6 UTF-16 be, UTF-32 be support (#1535)
* Refactored string search

string search logic moved from librz/bin/bfile.c to
librz/util/str_search.c

* UTF-16BE and UTF-32BE support

* Decoupled rz_str_search with rz_bin

* Changed parameter order in rz_scan_strings

* Fixed needle reset in rz_string_search

Now when the string search fails, needle is restored to original_needle+1,
i.e., we continue the searching process starting from the next byte.

* Changed heuristic for UTF BE detection

one more byte in for the detection (6 instead of 5)

* Fixed unit test in str_search

* Refactored rz_scan_strings and better UTF16-LE and UTF16-BE detection

Now if there is an ambiguity between UTF16-LE and UTF16-BE, we take the
longest one.

* Changed UTF BE heuristic

If there is any ambiguity about big-endian or little-endian, always
choose little endian

* Small format fixes in str_search

* Added preferred endianess switch in RzUtilStrScanOptions

* Fixed str_search regression tests
2021-09-21 23:14:15 +08:00
..
auxiliary Set CI buildtypes to highest opt level possible and set default buildtype to debugoptimized (#260) 2021-03-10 18:00:56 +08:00
legacy_unit Fix python linter 2021-08-30 17:31:09 +02:00
.gitignore
meson.build UTF-16 be, UTF-32 be support (#1535) 2021-09-21 23:14:15 +08:00
minunit.h Support rz_read_<endianness>_float/rz_read_<endianness>_double (#850) 2021-03-17 15:03:37 +01:00
mock_io.inl SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
rz_arch_buffer.h Add some SPDX headers (#1469) 2021-08-17 18:27:03 +02:00
rz_test_cmd_test Change -, --, = argument and = command meaning (#930) 2021-04-21 16:20:24 +08:00
test_addr_interval.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_agraph.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_analysis_block.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_analysis_block_invars.inl SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_analysis_cc.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_analysis_class_graph.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_analysis_function.c Refactor RzTypes to use structs instead of SDB + New Tree-Sitter based C Parser (#1047) 2021-07-20 01:46:45 +08:00
test_analysis_global_var.c Fix Global Variable UAF after deleting flag manually (#1697) 2021-09-16 15:51:36 +08:00
test_analysis_hints.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_analysis_meta.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_analysis_op.c Fixes for value analysis (#1520) 2021-08-27 22:07:39 +08:00
test_analysis_var.c Refactor RzTypes to use structs instead of SDB + New Tree-Sitter based C Parser (#1047) 2021-07-20 01:46:45 +08:00
test_analysis_xrefs.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_annotated_code.c Use rz_cons_get_buffer_dup 2021-08-27 20:12:57 +02:00
test_autocmplt.c Add autocomplete function and cmd arg type for global variables (#1577) 2021-09-03 15:49:23 +08:00
test_base64.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_big.c Rename RNum to the RzNum (#1539) 2021-08-29 21:06:29 +02:00
test_bin.c Convert i commands to rzshell (#1238) 2021-09-04 22:37:05 +08:00
test_bin_lines.c Add new Line Data Structure 2021-03-30 13:07:05 +08:00
test_binheap.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_bitmap.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_buf.c librz/util: Fix double free in buf when whole_buf is not allocated (#1362) 2021-07-27 12:52:42 +08:00
test_cmd.c core/cmd_descs: add support for default_mode 2021-08-30 17:31:09 +02:00
test_config.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_config.h.in Add some SPDX headers (#1469) 2021-08-17 18:27:03 +02:00
test_cons.c Simplify kill_word functions in dietline and fix META-D bug 2021-04-22 11:47:44 +02:00
test_contrbtree.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_core_bin.c Reorganize map skyline segments 2021-08-03 22:44:38 +08:00
test_core_cmd.c Rename newshell to rzshell and parser commands to statements 2021-04-22 19:45:14 +08:00
test_core_seek.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_core_task.c Use rz_cons_get_buffer_dup 2021-08-27 20:12:57 +02:00
test_debruijn.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_debug.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_debug_session.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_diff.c Fix few clang-cl warnings 2021-09-04 12:06:07 +02:00
test_dwarf.c Add configuration variables elf.load.sections 2021-07-28 16:40:14 +02:00
test_dwarf_info.c Add configuration variables elf.load.sections 2021-07-28 16:40:14 +02:00
test_dwarf_integration.c Add configuration variables elf.load.sections 2021-07-28 16:40:14 +02:00
test_endian.c Support rz_read_<endianness>_float/rz_read_<endianness>_double (#850) 2021-03-17 15:03:37 +01:00
test_event.c Fix few clang-cl warnings 2021-09-04 12:06:07 +02:00
test_file.c Fix Coverity CID 317020 (UAF) 2021-04-13 19:06:20 +08:00
test_flags.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_glob.c Add support to rz_str_glob and add tests (#18420) 2021-03-16 16:57:32 +08:00
test_graph.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_hash.c Added details on pointer ownership (#1164) 2021-05-24 20:17:21 +02:00
test_hex.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_id_storage.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_idpool.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_idstorage.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_inflate_deflate.c Add missing copyrights (#1570) 2021-09-02 16:39:50 +08:00
test_intervaltree.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_io.c Fix #1506 - Fix unsigned integer overflow in RzIO cache skyline (#1512) 2021-08-25 16:36:20 +08:00
test_io_ihex.c Fix ihex Write for >2 16bit Pages 2021-05-11 09:53:51 +02:00
test_itv.c Reorganize map skyline segments 2021-08-03 22:44:38 +08:00
test_json.c New RzJson to string API (#1121) 2021-05-11 19:01:14 +02:00
test_list.c Add rz_list_find_ptr() (#1092) 2021-04-30 10:07:39 +02:00
test_ovf.c Fix #1506 - Fix unsigned integer overflow in RzIO cache skyline (#1512) 2021-08-25 16:36:20 +08:00
test_pdb.c Add tests for rz_type*_as_string() functions 2021-09-11 19:58:22 +08:00
test_pj.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_project_migrate.c Bump Project version to 5, add unknown_t 2021-09-09 00:50:05 +08:00
test_queue.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_rbtree.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_reg.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_run.c Add RzRun tests 2021-08-23 18:45:22 +08:00
test_rz_test.c Convert ! commands to newshell (#1235) 2021-07-28 10:33:33 +02:00
test_rzpipe.c test: use inplace 'rizin' binary for 'rzpipe' test 2021-06-14 18:32:40 +08:00
test_sdb.h Add some SPDX headers (#1469) 2021-08-17 18:27:03 +02:00
test_serialize_analysis.c Add tests for rz_type*_as_string() functions 2021-09-11 19:58:22 +08:00
test_serialize_config.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_serialize_flag.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_serialize_spaces.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_serialize_types.c Refactor RzTypes to use structs instead of SDB + New Tree-Sitter based C Parser (#1047) 2021-07-20 01:46:45 +08:00
test_sign.c Refactor RzTypes to use structs instead of SDB + New Tree-Sitter based C Parser (#1047) 2021-07-20 01:46:45 +08:00
test_skiplist.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_skyline.c Fix #1506 - Fix unsigned integer overflow in RzIO cache skyline (#1512) 2021-08-25 16:36:20 +08:00
test_spaces.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_sparse.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_stack.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_str.c Use str{l,n}cpy() in rz_str_ncpy() instead of a loop (#1395) 2021-08-25 18:21:45 +08:00
test_str_search.c UTF-16 be, UTF-32 be support (#1535) 2021-09-21 23:14:15 +08:00
test_strbuf.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_subprocess.c Convert ! commands to newshell (#1235) 2021-07-28 10:33:33 +02:00
test_table.c Fix test_rz_table_transpose unit test 2021-08-28 22:16:23 +08:00
test_task.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_tree.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_type.c Fix Leaks in Types string conversions 2021-09-21 23:14:15 +08:00
test_types.h Add some SPDX headers (#1469) 2021-08-17 18:27:03 +02:00
test_uleb128.c SPDX Copyright text for all files based on history 2021-03-05 19:39:15 +08:00
test_unum.c Rename RNum to the RzNum (#1539) 2021-08-29 21:06:29 +02:00
test_util.c Fix Coverity CID 317125 (NULL DEREF) 2021-04-13 19:06:20 +08:00
test_vector.c Add head and tail for RzVector and RzPVector (#1450) 2021-08-15 22:53:47 +08:00