Commit Graph
7 Commits
Author SHA1 Message Date
Cole Munz 8a5a88e463 fix string leak in cli args_free (#2220)
args_parse zeroed every option's value pointer right before returning, so args_free's NULL check always skipped the free. Even without that, args_free was freeing the address of the caller's static variable (e.g. &ext_vars), not the string it points to.

On Windows (_UNICODE builds) each ARGS_OPT_STRING value is a heap copy from unicode_to_ansi(), so -d, -x, -i, atom-quality-table and module-data args leaked on every run. On non-Windows the value just aliases argv, nothing to free.

Removed the value-clearing loop in args_parse (nothing reads .value after parsing except args_free) and rewrote args_free to walk options->count entries and free the actual string pointers, gated on _UNICODE so it's a no-op elsewhere.
2026-07-06 09:43:47 +02:00
Victor M. Alvarez 1b50330646 Implement the --skip-larger command-line option in Windows. (#1678)
Also allow a 64 bits integer as the argument to --skip-larger both in Linux and Windows.
2022-04-06 11:11:45 +02:00
pwrdwnsys b9c91e55cf remove duplicate include for args.h (#1641) 2022-02-01 09:50:25 +01:00
Victor M. Alvarez 57057e86e8 Implement support for unicode file names in Windows. (#1491) 2021-05-11 13:00:30 +02:00
Victor M. Alvarez 0bce4bd74d Start using clang-format for formatting the code automatically. 2020-10-07 16:27:30 +02:00
Wesley Shields dc8f644b21 Implement -N (--no-follow-symlinks).
Implement a -N flag which causes yara to not follow any symlinks when scanning,
regardless of the recursive option.
2020-09-04 09:10:22 +02:00
Victor M. Alvarez 8d3f8259ad Move command line tools to their own directory. 2020-06-26 09:17:35 +02:00