[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r2508 - Extractor/src/plugins/wordleaker
From: |
grothoff |
Subject: |
[GNUnet-SVN] r2508 - Extractor/src/plugins/wordleaker |
Date: |
Tue, 14 Mar 2006 21:24:19 -0800 (PST) |
Author: grothoff
Date: 2006-03-14 21:24:17 -0800 (Tue, 14 Mar 2006)
New Revision: 2508
Modified:
Extractor/src/plugins/wordleaker/wordextractor.cc
Log:
fix
Modified: Extractor/src/plugins/wordleaker/wordextractor.cc
===================================================================
--- Extractor/src/plugins/wordleaker/wordextractor.cc 2006-03-15 04:55:39 UTC
(rev 2507)
+++ Extractor/src/plugins/wordleaker/wordextractor.cc 2006-03-15 05:24:17 UTC
(rev 2508)
@@ -308,8 +308,16 @@
struct
EXTRACTOR_Keywords * prev) {
char ver[16];
char product[128];
- if (size < 512 + 898)
+ if ( (size < 512 + 898) || (filename == NULL) )
return prev;
+
+ POLE::Storage* storage = new POLE::Storage(filename);
+ storage->open();
+ if (storage->result() != POLE::Storage::Ok ) {
+ delete storage;
+ return prev;
+ }
+
const unsigned char * buffer = (const unsigned char*) &data[512];
unsigned int wIdent = buffer[0] + (buffer[1] << 8);
unsigned int nProduct = buffer[4] + (buffer[5] << 8);
@@ -357,13 +365,6 @@
prev);
}
- POLE::Storage* storage = new POLE::Storage( filename );
- storage->open();
- if (storage->result() != POLE::Storage::Ok ) {
- delete storage;
- return prev;
- }
-
POLE::Stream * stream = storage->stream( "SummaryInformation" );
if (stream) {
unsigned char buffer[256];
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r2508 - Extractor/src/plugins/wordleaker,
grothoff <=