Skip to content

Commit

Permalink
doc/byte_math: Add divide by 0 discussion.
Browse files Browse the repository at this point in the history
Issue: 5945
  • Loading branch information
jlucovsky authored and victorjulien committed Apr 12, 2023
1 parent 38c5e89 commit fd46c93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/userguide/rules/differences-from-snort.rst
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ See :doc:`http-keywords` for all HTTP keywords.
uint32 value. Snort rejects ``rvalue`` values of ``0`` and requires
values to be between ``[1..max-uint32 value]``.

- Suricata will never match if there's a zero divisor. Division by 0 is undefined.


``isdataat`` Keyword
--------------------
Expand Down
2 changes: 2 additions & 0 deletions doc/userguide/rules/payload-keywords.rst
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@ an existing variable or a specified value.

When ``relative`` is included, there must be a previous ``content`` or ``pcre`` match.

Note: if ``oper`` is ``/`` and the divisor is 0, there will never be a match on the ``byte_math`` keyword.

The result can be stored in a result variable and referenced by
other rule options later in the rule.

Expand Down

0 comments on commit fd46c93

Please sign in to comment.