From 78d9e38167662a5b6f04a80c51a6112c99587de2 Mon Sep 17 00:00:00 2001 From: Seth Hall Date: Mon, 4 Apr 2016 15:07:01 -0400 Subject: [PATCH] Fix a small bug with scriptland data types that led to a crash. --- scripts/base/init-bare.bro | 2 -- src/analyzer/protocol/smb/smb1-com-negotiate.pac | 7 +++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/base/init-bare.bro b/scripts/base/init-bare.bro index 464cee886f..77db2ed761 100644 --- a/scripts/base/init-bare.bro +++ b/scripts/base/init-bare.bro @@ -2552,8 +2552,6 @@ export { }; type SMB1::NegotiateResponseCore: record { - ## Count of parameter words (should be 1) - word_count : count; ## Index of selected dialect dialect_index : count; }; diff --git a/src/analyzer/protocol/smb/smb1-com-negotiate.pac b/src/analyzer/protocol/smb/smb1-com-negotiate.pac index 17b6242a01..74941694ff 100644 --- a/src/analyzer/protocol/smb/smb1-com-negotiate.pac +++ b/src/analyzer/protocol/smb/smb1-com-negotiate.pac @@ -74,12 +74,11 @@ refine connection SMB_Conn += { { case 0x01: core = new RecordVal(BifType::Record::SMB1::NegotiateResponseCore); - core->Assign(0, new Val(${val.word_count}, TYPE_COUNT)); - core->Assign(1, new Val(${val.dialect_index}, TYPE_COUNT)); - core->Assign(2, new Val(${val.core.byte_count}, TYPE_COUNT)); - + core->Assign(0, new Val(${val.dialect_index}, TYPE_COUNT)); + response->Assign(0, core); break; + case 0x0d: security = new RecordVal(BifType::Record::SMB1::NegotiateResponseSecurity); security->Assign(0, new Val(${val.lanman.security_user_level}, TYPE_BOOL));