yara-ffi 4.1.0 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f964b7eb475719ea6ceb456125b6ead06be8d9263a8839267ee96cdbe072b470
4
- data.tar.gz: 36cc2f79374b0d00f245329f5d3e18423b6f16740e92f893c07d662f2183ce67
3
+ metadata.gz: 3fa2c27bb3bea50c5282b7a792f9371e27943172fe89e7fc33217044794a1ab8
4
+ data.tar.gz: '097535aa8725b49f8a7ca77fb82e287a5797211f94fd0364b4a4fce445be7c87'
5
5
  SHA512:
6
- metadata.gz: 5636bffbece91a2b3d48568e7bcac3e75d0f7713231c1a0abfbcbf83a0436b1d950ca5dccb5dae98b82c6ab3686521f61b561a2802f1c26145f887ea64fccf37
7
- data.tar.gz: b10394734d3c00d986a5f12a6a2682087a7641e2abb62108728fc699f1e79f395f4bf2c5d94842c440fb15c960690773760907be56b4f14edbe5c86c3589aa3c
6
+ metadata.gz: b9c4b4112cc8b426bf3c98cdc31e69e44af6be6928e064cf4392933af84a25148c32457e4791defe37b9df96e5ce4786f2f47282790313a44c14456bc9dae8cf
7
+ data.tar.gz: 32706384ba6e60343cad2df010d9ee4b7be46be9fb72e4e8b7453bafe7d01c53ddfc72f10fb8123456260d25c4b7751493faaa1780a03b58576041b78a8516b1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [4.1.1] - 2025-08-20
4
+
5
+ - **FIXED**: Fixed crash when `Yara.test` or `Yara.scan` receive `nil` as the test string parameter ([#15](https://github.com/jonmagic/yara-ffi/issues/15))
6
+ - `nil` values are now treated as empty strings instead of causing `NoMethodError`
7
+ - Both `Yara.test(rule, nil)` and `Yara.scan(rule, nil)` now return empty `ScanResults` objects
8
+
3
9
  ## [4.1.0] - 2025-08-20
4
10
 
5
11
  - **NEW**: Added advanced `Yara::Compiler` API for complex rule compilation scenarios
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- yara-ffi (4.1.0)
4
+ yara-ffi (4.1.1)
5
5
  ffi
6
6
 
7
7
  GEM
data/lib/yara/scanner.rb CHANGED
@@ -225,6 +225,9 @@ module Yara
225
225
  def scan(test_string)
226
226
  raise NotCompiledError, "Rules not compiled. Call compile() first." unless @scanner_pointer
227
227
 
228
+ # Handle nil input by treating it as empty string
229
+ test_string = "" if test_string.nil?
230
+
228
231
  results = ScanResults.new
229
232
 
230
233
  # Set up callback for matching rules
data/lib/yara/version.rb CHANGED
@@ -5,5 +5,5 @@ module Yara
5
5
  #
6
6
  # This constant holds the current version of the Ruby gem, not the underlying
7
7
  # YARA-X library version. The gem version follows semantic versioning.
8
- VERSION = "4.1.0"
8
+ VERSION = "4.1.1"
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yara-ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Hoyt