mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/johanna/file-framework-mime-type-detection'
* origin/topic/johanna/file-framework-mime-type-detection: Fix potential mime type detection bug in IRC/FTP file_transferred event
This commit is contained in:
commit
1d46bcbb81
3 changed files with 11 additions and 2 deletions
9
CHANGES
9
CHANGES
|
@ -1,4 +1,13 @@
|
|||
|
||||
4.1.0-dev.316 | 2021-03-10 13:00:27 +0000
|
||||
|
||||
* Fix potential mime type detection bug in IRC/FTP file_transferred event
|
||||
|
||||
The files framework uses strncpy to copy data into the buffer that is
|
||||
used for IRC/FTP mime type detection. From all I can tell that means
|
||||
that, in these cases, currently mime type detection will be messed up if
|
||||
the data being passed in contains zero bytes. (Johanna Amann, Corelight)
|
||||
|
||||
4.1.0-dev.314 | 2021-03-08 18:28:22 -0800
|
||||
|
||||
* new "opt" btest alternative (Vern Paxson, Corelight)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
4.1.0-dev.314
|
||||
4.1.0-dev.316
|
||||
|
|
|
@ -25,7 +25,7 @@ void File_Analyzer::DeliverStream(int len, const u_char* data, bool orig)
|
|||
|
||||
if ( n )
|
||||
{
|
||||
strncpy(buffer + buffer_len, (const char*) data, n);
|
||||
memcpy(buffer + buffer_len, (const char*) data, n);
|
||||
buffer_len += n;
|
||||
|
||||
if ( buffer_len == BUFFER_SIZE )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue