cisagov / icsnpp-bacnet

Zeek BACnet Parser - CISA ICSNPP
BSD 3-Clause "New" or "Revised" License
15 stars 11 forks source link

Fix a comparison that would cause an overflow error. #4

Closed keithjjones closed 2 years ago

keithjjones commented 2 years ago

๐Ÿ—ฃ Description

Line 120 in main.zeek would cause on overflow error because it compared a count to -1:

overflow promoting from unsigned/double to signed arithmetic value (int and 18446744073709551615)

This change instead checks to see if the value is in the table.

๐Ÿ’ญ Motivation and context

To fix an error showing up in reporter.log.

๐Ÿงช Testing

I didn't see any tests in this repo. I saw the error on a busy network I monitor so I thought I'd supply this change to your repo.

-->

โœ… Pre-approval checklist

โœ… Pre-merge checklist

โœ… Post-merge checklist