diff --git a/src/libgourou.cpp b/src/libgourou.cpp index 4fe1075..88a9a87 100644 --- a/src/libgourou.cpp +++ b/src/libgourou.cpp @@ -1205,14 +1205,14 @@ namespace gourou if ((*datasIt)->type() != uPDFParser::DataType::STREAM) continue; - GOUROU_LOG(DEBUG, "Decrypt stream id " << object->objectId()); - stream = (uPDFParser::Stream*) (*datasIt); unsigned char* encryptedData = stream->data(); unsigned int dataLength = stream->dataLength(); unsigned char* clearData = new unsigned char[dataLength]; unsigned int dataOutLength; + GOUROU_LOG(DEBUG, "Decrypt stream id " << object->objectId() << ", size " << stream->dataLength()); + client->Decrypt(CryptoInterface::ALGO_RC4, CryptoInterface::CHAIN_ECB, tmpKey, 16, /* Key */ NULL, 0, /* IV */ diff --git a/utils/adept_activate.cpp b/utils/adept_activate.cpp index fef2297..d8691ea 100644 --- a/utils/adept_activate.cpp +++ b/utils/adept_activate.cpp @@ -289,11 +289,12 @@ int main(int argc, char** argv) ; } + std::string pass; if (!password) { char prompt[128]; std::snprintf(prompt, sizeof(prompt), "Enter password for <%s> : ", username); - std::string pass = getpass((const char*)prompt, false); + pass = getpass((const char*)prompt, false); password = pass.c_str(); }