diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/analysis/scan/fuzzing.py | 20 | 
1 files changed, 20 insertions, 0 deletions
| diff --git a/tests/analysis/scan/fuzzing.py b/tests/analysis/scan/fuzzing.py index e26c496..5d99c35 100644 --- a/tests/analysis/scan/fuzzing.py +++ b/tests/analysis/scan/fuzzing.py @@ -192,3 +192,23 @@ rule test {  ''' % ("0" * (256 * 2 + 8), "0" * (256 * 2 + 8))          self.check_rule_success(rule) + + +    def testFileFinalAccess(self): +        """Ensure patterns found at the edges of scanned content do not crash the scanner.""" + +        cnt = MemoryContent(bytes([ 0 for i in range(16) ])) + +        rule = ''' +rule test { + +   bytes: +      $a = { 00 00 00 00 00 00 00 00 } + +   condition: +      $a + +} +''' + +        self.check_rule_success(rule, cnt) | 
