[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r2606 - Extractor/src/plugins/wordleaker
From: |
grothoff |
Subject: |
[GNUnet-SVN] r2606 - Extractor/src/plugins/wordleaker |
Date: |
Sat, 1 Apr 2006 20:08:44 -0800 (PST) |
Author: grothoff
Date: 2006-04-01 20:08:42 -0800 (Sat, 01 Apr 2006)
New Revision: 2606
Modified:
Extractor/src/plugins/wordleaker/wordextractor.cc
Log:
Ronan Melennec writes:
Hello Christian,
This is a quick fix for wordextractor.cc, to avoid false positives
(example below). The fix is to just look at the file magic number.
The test may not be thorough enough -- I don't know
whether non OLE-2 Word files are supposed to be covered here ?
Modified: Extractor/src/plugins/wordleaker/wordextractor.cc
===================================================================
--- Extractor/src/plugins/wordleaker/wordextractor.cc 2006-04-02 03:48:51 UTC
(rev 2605)
+++ Extractor/src/plugins/wordleaker/wordextractor.cc 2006-04-02 04:08:42 UTC
(rev 2606)
@@ -321,7 +321,11 @@
if ( (size < 512 + 898) || (filename == NULL) )
return prev;
+ if (0 != memcmp(data, "\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1", 8))
+ /* look at file magic number to avoid false positives */
+ return prev;
+
POLE::Storage* storage = new POLE::Storage(filename);
storage->open();
if (storage->result() != POLE::Storage::Ok ) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r2606 - Extractor/src/plugins/wordleaker,
grothoff <=