Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update yara to 4.5.2
Browse files Browse the repository at this point in the history
vthib committed Sep 17, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 8b0aeab commit 0ec61d6
Showing 12 changed files with 64 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ jobs:
override: true
- uses: katyo/publish-crates@v1
with:
args: "--features bundled-4_5_1"
args: "--features bundled-4_5_2"
dry-run: ${{ github.event.inputs.dry_run }}
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -26,14 +26,14 @@ jobs:
- name: Cargo fmt
run: cargo fmt --all -- --check
- name: Cargo clippy
run: cargo clippy --features bindgen,bundled-4_5_1,vendored -- -D warnings
run: cargo clippy --features bindgen,bundled-4_5_2,vendored -- -D warnings

test-posix:
strategy:
matrix:
os: [ ubuntu-latest ]
target: ["x86_64-unknown-linux-musl", "x86_64-unknown-linux-gnu"]
features: [ "vendored,bindgen", "vendored,bundled-4_5_1" ]
features: [ "vendored,bindgen", "vendored,bundled-4_5_2" ]
rust: [ stable, nightly ]

runs-on: ${{ matrix.os }}
@@ -54,7 +54,7 @@ jobs:
strategy:
matrix:
os: [ windows-2019 ]
features: [ "vendored,bundled-4_5_1" ]
features: [ "vendored,bundled-4_5_2" ]
rust: [ stable ]
cryptolib: [ "WinCrypt", "disabled" ]

@@ -81,7 +81,7 @@ jobs:
strategy:
matrix:
os: [ macos-13 ]
features: [ "vendored,bindgen", "vendored,bundled-4_5_1" ]
features: [ "vendored,bindgen", "vendored,bundled-4_5_2" ]
rust: [ stable, nightly ]
cryptolib: [ "OpenSSL", "CommonCrypto", "disabled" ]
openssl_dir: [ "/usr/local/opt/[email protected]" ]
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ rust-version = "1.63"
[features]
default = ["bindgen", 'module-dotnet', 'module-dex', 'module-macho', 'module-hash', 'ndebug']
bindgen = ["yara-sys/bindgen"]
bundled-4_5_1 = ["yara-sys/bundled-4_5_1"]
bundled-4_5_2 = ["yara-sys/bundled-4_5_2"]
vendored = ["yara-sys/vendored"]
module-cuckoo = ["yara-sys/module-cuckoo"]
module-magic = ["yara-sys/module-magic"]
4 changes: 2 additions & 2 deletions yara-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ edition = "2018"

[features]
default = ["bindgen", 'module-dotnet', 'module-dex', 'module-macho', 'module-hash', 'ndebug']
bundled-4_5_1 = []
bundled-4_5_2 = []
vendored = ["cc", "glob", "fs_extra"]
module-cuckoo = []
module-magic = []
@@ -35,4 +35,4 @@ fs_extra = { version = "1.2", optional = true }

[package.metadata.docs.rs]
no-default-features = true
features = ["bundled-4_5_1"]
features = ["bundled-4_5_2"]
6 changes: 3 additions & 3 deletions yara-sys/README.md
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@ version of Yara. Just make sure the version you specify is the same that the
version on your system!

- `bindgen`: **recommended**: this is the default feature, to use generated bindings.
- `vendored`: automatically compile and link libyara v4.5.1.
- `bundled-4_5_1`: use pre-generated bindings for Yara 4.5.1. Useful if you do not
- `vendored`: automatically compile and link libyara v4.5.2.
- `bundled-4_5_2`: use pre-generated bindings for Yara 4.5.2. Useful if you do not
want to install LLVM to run bindgen. However, you'll have to make sure you use
a version of Yara with the same major and minor version number. List of supported targets:
- x86_64-apple-darwin
@@ -38,7 +38,7 @@ You can specify the following environment variables:
You can also specify the `yara-static` feature to link Yara statically
rather than dynamically.

## Compile options for libyara v4.5.1
## Compile options for libyara v4.5.2

When using the `vendored` feature, Yara will be automatically built and linked
statically with yara-sys.
Original file line number Diff line number Diff line change
@@ -4750,7 +4750,7 @@ pub struct _YR_COMPILER {
pub lex_buf: [::std::os::raw::c_char; 8192usize],
pub lex_buf_ptr: *mut ::std::os::raw::c_char,
pub lex_buf_len: ::std::os::raw::c_ushort,
pub include_base_dir: [::std::os::raw::c_char; 1024usize],
pub include_base_dir: [::std::os::raw::c_char; 4096usize],
pub user_data: *mut ::std::os::raw::c_void,
pub incl_clbk_user_data: *mut ::std::os::raw::c_void,
pub re_ast_clbk_user_data: *mut ::std::os::raw::c_void,
@@ -4766,7 +4766,7 @@ fn bindgen_test_layout__YR_COMPILER() {
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<_YR_COMPILER>(),
10456usize,
13528usize,
concat!("Size of: ", stringify!(_YR_COMPILER))
);
assert_eq!(
@@ -5086,7 +5086,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).user_data) as usize - ptr as usize },
10368usize,
13440usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -5096,7 +5096,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).incl_clbk_user_data) as usize - ptr as usize },
10376usize,
13448usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -5106,7 +5106,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).re_ast_clbk_user_data) as usize - ptr as usize },
10384usize,
13456usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -5116,7 +5116,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize },
10392usize,
13464usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -5126,7 +5126,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).include_callback) as usize - ptr as usize },
10400usize,
13472usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -5136,7 +5136,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).include_free) as usize - ptr as usize },
10408usize,
13480usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -5146,7 +5146,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).re_ast_callback) as usize - ptr as usize },
10416usize,
13488usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -5156,7 +5156,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).atoms_config) as usize - ptr as usize },
10424usize,
13496usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
Original file line number Diff line number Diff line change
@@ -7360,7 +7360,7 @@ pub struct _YR_COMPILER {
pub lex_buf: [::std::os::raw::c_char; 8192usize],
pub lex_buf_ptr: *mut ::std::os::raw::c_char,
pub lex_buf_len: ::std::os::raw::c_ushort,
pub include_base_dir: [::std::os::raw::c_char; 260usize],
pub include_base_dir: [::std::os::raw::c_char; 4096usize],
pub user_data: *mut ::std::os::raw::c_void,
pub incl_clbk_user_data: *mut ::std::os::raw::c_void,
pub re_ast_clbk_user_data: *mut ::std::os::raw::c_void,
@@ -7376,7 +7376,7 @@ fn bindgen_test_layout__YR_COMPILER() {
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<_YR_COMPILER>(),
9760usize,
13600usize,
concat!("Size of: ", stringify!(_YR_COMPILER))
);
assert_eq!(
@@ -7696,7 +7696,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).user_data) as usize - ptr as usize },
9664usize,
13504usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -7706,7 +7706,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).incl_clbk_user_data) as usize - ptr as usize },
9672usize,
13512usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -7716,7 +7716,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).re_ast_clbk_user_data) as usize - ptr as usize },
9680usize,
13520usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -7726,7 +7726,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize },
9688usize,
13528usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -7736,7 +7736,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).include_callback) as usize - ptr as usize },
9696usize,
13536usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -7746,7 +7746,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).include_free) as usize - ptr as usize },
9704usize,
13544usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -7756,7 +7756,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).re_ast_callback) as usize - ptr as usize },
9712usize,
13552usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -7766,7 +7766,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).atoms_config) as usize - ptr as usize },
9720usize,
13560usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
Original file line number Diff line number Diff line change
@@ -7360,7 +7360,7 @@ pub struct _YR_COMPILER {
pub lex_buf: [::std::os::raw::c_char; 8192usize],
pub lex_buf_ptr: *mut ::std::os::raw::c_char,
pub lex_buf_len: ::std::os::raw::c_ushort,
pub include_base_dir: [::std::os::raw::c_char; 260usize],
pub include_base_dir: [::std::os::raw::c_char; 4096usize],
pub user_data: *mut ::std::os::raw::c_void,
pub incl_clbk_user_data: *mut ::std::os::raw::c_void,
pub re_ast_clbk_user_data: *mut ::std::os::raw::c_void,
@@ -7376,7 +7376,7 @@ fn bindgen_test_layout__YR_COMPILER() {
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<_YR_COMPILER>(),
9760usize,
13600usize,
concat!("Size of: ", stringify!(_YR_COMPILER))
);
assert_eq!(
@@ -7696,7 +7696,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).user_data) as usize - ptr as usize },
9664usize,
13504usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -7706,7 +7706,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).incl_clbk_user_data) as usize - ptr as usize },
9672usize,
13512usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -7716,7 +7716,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).re_ast_clbk_user_data) as usize - ptr as usize },
9680usize,
13520usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -7726,7 +7726,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize },
9688usize,
13528usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -7736,7 +7736,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).include_callback) as usize - ptr as usize },
9696usize,
13536usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -7746,7 +7746,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).include_free) as usize - ptr as usize },
9704usize,
13544usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -7756,7 +7756,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).re_ast_callback) as usize - ptr as usize },
9712usize,
13552usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
@@ -7766,7 +7766,7 @@ fn bindgen_test_layout__YR_COMPILER() {
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).atoms_config) as usize - ptr as usize },
9720usize,
13560usize,
concat!(
"Offset of field: ",
stringify!(_YR_COMPILER),
Loading

0 comments on commit 0ec61d6

Please sign in to comment.