From 07c4662dc4552ecd4d5b237de331c7b9ab369080 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Mon, 7 Dec 2020 16:52:52 -0800 Subject: [PATCH] Fix narrowing conversion compiler error in SMB error-response logic --- CHANGES | 4 ++++ VERSION | 2 +- src/analyzer/protocol/smb/smb2-protocol.pac | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 5d07168ed5..50fb7c976f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,8 @@ +3.3.0-dev.630 | 2020-12-07 16:52:52 -0800 + + * Fix narrowing conversion compiler error in SMB error-response logic (Jon Siwek, Corelight) + 3.3.0-dev.629 | 2020-12-07 16:03:25 -0800 * Add tests for new SMB3 multichannel support (Vlad Grigorescu) diff --git a/VERSION b/VERSION index 7d863bdf07..bf24e512cb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.3.0-dev.629 +3.3.0-dev.630 diff --git a/src/analyzer/protocol/smb/smb2-protocol.pac b/src/analyzer/protocol/smb/smb2-protocol.pac index 517b39bb76..95d320fbbb 100644 --- a/src/analyzer/protocol/smb/smb2-protocol.pac +++ b/src/analyzer/protocol/smb/smb2-protocol.pac @@ -282,7 +282,9 @@ refine connection SMB_Conn += { // Non-zero USUALLY means an error, except for the specific cases detailed in // [MS-SMB2] 3.3.4.4 Sending an Error Response - switch ( ${header.status} ) { + auto status = static_cast(${header.status}); + + switch ( status ) { case 0: // No error. return false;