Skip to content

Commit

Permalink
Merge pull request #1216 from Yamato-Security/1215-fix-panic-when-dat…
Browse files Browse the repository at this point in the history
…a-field-not-exists

fix: added initial value when there is no `Data` field
  • Loading branch information
YamatoSecurity authored Nov 13, 2023
2 parents 143aea3 + 64ce94a commit 36da864
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/detections/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ pub fn parse_message(
if suffix >= 1 {
tmp_event_record = tmp_event_record
.get("Data")
.unwrap()
.unwrap_or(tmp_event_record)
.get((suffix - 1) as usize)
.unwrap_or(tmp_event_record);
}
Expand Down

0 comments on commit 36da864

Please sign in to comment.