Skip to content

Instantly share code, notes, and snippets.

@sethhall
Last active August 29, 2015 14:14
Show Gist options
  • Select an option

  • Save sethhall/6ec210d99736bd54c351 to your computer and use it in GitHub Desktop.

Select an option

Save sethhall/6ec210d99736bd54c351 to your computer and use it in GitHub Desktop.
fix issue in files framework
diff --git a/src/file_analysis/File.cc b/src/file_analysis/File.cc
index d0b1ea2..c1e5e3d 100644
--- a/src/file_analysis/File.cc
+++ b/src/file_analysis/File.cc
@@ -505,10 +505,12 @@ void File::EndOfFile()
if ( ! bof_buffer.full )
{
DBG_LOG(DBG_FILE_ANALYSIS, "[%s] File over but bof_buffer not full.", id.c_str());
- bof_buffer.full = true;
+ bof_buffer.full = true;
+ if ( ! did_mime_type &&
+ LookupFieldDefaultCount(missing_bytes_idx) == 0 )
+ DetectMIME();
DeliverStream((const u_char*) "", 0);
}
- analyzers.DrainModifications();
done = true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment