diff --git a/FlexLexer.h b/FlexLexer.h index b115b5d..a06fb21 100755 --- a/FlexLexer.h +++ b/FlexLexer.h @@ -33,15 +33,15 @@ // // If you want to create multiple lexer classes, you use the -P flag // to rename each yyFlexLexer to some other xxFlexLexer. You then -// include in your other sources once per lexer class: +// include "FlexLexer.h" in your other sources once per lexer class: // // #undef yyFlexLexer // #define yyFlexLexer xxFlexLexer -// #include +// #include "FlexLexer.h" // // #undef yyFlexLexer // #define yyFlexLexer zzFlexLexer -// #include +// #include "FlexLexer.h" // ... #ifndef __FLEX_LEXER_H @@ -204,5 +204,3 @@ class yyFlexLexer : public FlexLexer { #endif // yyFlexLexer || ! yyFlexLexerOnce - -// 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689 diff --git a/bif.yy.cpp b/bif.yy.cpp index 5e357d1..8f652bc 100644 --- a/bif.yy.cpp +++ b/bif.yy.cpp @@ -379,7 +379,7 @@ typedef unsigned char YY_CHAR; #define yytext_ptr yytext -#include +#include "FlexLexer.h" int yyFlexLexer::yywrap() { return 1; } int yyFlexLexer::yylex() diff --git a/bifscanner.h b/bifscanner.h index a6ec9e4..ded78da 100755 --- a/bifscanner.h +++ b/bifscanner.h @@ -28,7 +28,7 @@ #if ! defined(yyFlexLexerOnce) #undef yyFlexLexer #define yyFlexLexer bifFlexLexer -#include +#include "FlexLexer.h" #endif // Override the interface for yylex since we namespaced it diff --git a/cmdoptions.yy.cpp b/cmdoptions.yy.cpp index d8fd6ce..1484981 100644 --- a/cmdoptions.yy.cpp +++ b/cmdoptions.yy.cpp @@ -379,7 +379,7 @@ typedef unsigned char YY_CHAR; #define yytext_ptr yytext -#include +#include "FlexLexer.h" int yyFlexLexer::yywrap() { return 1; } int yyFlexLexer::yylex() diff --git a/cmdoptionsscanner.h b/cmdoptionsscanner.h index a48af09..e02c1f1 100755 --- a/cmdoptionsscanner.h +++ b/cmdoptionsscanner.h @@ -29,7 +29,7 @@ #undef yyFlexLexer #define yyFlexLexer reginitFlexLexer -#include +#include "FlexLexer.h" #endif // Override the interface for yylex since we namespaced it diff --git a/elftools.cpp b/elftools.cpp index 7674e39..19b05de 100755 --- a/elftools.cpp +++ b/elftools.cpp @@ -127,18 +127,18 @@ ElfFormat32::ElfFormat32(uint8_t* start) elfHdrEntryCount = 1; /* Basic ELF checks */ - if(ELFHdrEntrySize() != sizeof(Elf32_Ehdr)) - { - LOG_DEBUG(DEBUG_STAMP, "ELF Header size wrong - %d, actual size - %d", ELFHdrEntrySize(), sizeof(Elf64_Ehdr)); - LOG_ERROR("ELF Parsing Error !!!\n Wrong Header Size"); - } - if (memcmp(header.e_ident, ELFMAG, 4) != 0) { LOG_DEBUG(DEBUG_STAMP, "ELF magic identification word wrong"); LOG_ERROR("ELF Parsing Error !!!\n ELF magic identification word wrong"); } + if(ELFHdrEntrySize() != sizeof(Elf32_Ehdr)) + { + LOG_DEBUG(DEBUG_STAMP, "ELF Header size wrong - %d, actual size - %d", ELFHdrEntrySize(), sizeof(Elf64_Ehdr)); + LOG_ERROR("ELF Parsing Error !!!\n Wrong Header Size"); + } + /* If a Section header is defined, get its pointer and its record size count. Otherwise, default it to NULL. */ if(header.e_shoff == 0) @@ -495,18 +495,18 @@ ElfFormat64::ElfFormat64(uint8_t* start) /* Get the header's size. For completeness, tell upper layers that we only have one record. */ elfHdrEntryCount = 1; - - if( ELFHdrEntrySize() != sizeof( Elf64_Ehdr ) ) - { - LOG_DEBUG(DEBUG_STAMP, "ELF Header size wrong - %d, actual size - %d", ELFHdrEntrySize(), sizeof(Elf64_Ehdr)); - LOG_ERROR("ELF Parsing Error !!!\n Wrong Header Size"); - } - + if ( memcmp( header.e_ident, ELFMAG, 4 ) != 0 ) { LOG_DEBUG(DEBUG_STAMP, "ELF magic identification word wrong"); LOG_ERROR("ELF Parsing Error !!!\n ELF magic identification word wrong"); } + + if( ELFHdrEntrySize() != sizeof( Elf64_Ehdr ) ) + { + LOG_DEBUG(DEBUG_STAMP, "ELF Header size wrong - %d, actual size - %d", ELFHdrEntrySize(), sizeof(Elf64_Ehdr)); + LOG_ERROR("ELF Parsing Error !!!\n Wrong Header Size"); + } /* If a Section header is defined, get its pointer and its record size count. Otherwise, default it to NULL. */ diff --git a/encryption.cpp b/encryption.cpp index 6495bae..6a7072a 100755 --- a/encryption.cpp +++ b/encryption.cpp @@ -319,7 +319,7 @@ static uint32_t GetRandomValue(uint32_t maxValue) do { - returnValue = (myrand() / (int)(((unsigned)RAND_MAX + 1) / maxValue)); + returnValue = (rand() / (int)(((unsigned)RAND_MAX + 1) / maxValue)); } while (returnValue > maxValue); return returnValue; @@ -642,4 +642,4 @@ void AesGcmEncryptionContext::AesGcm256Decrypt(unsigned char* gcm_pt, int& pt_le EVP_CIPHER_CTX_free(ctx); pt_len = outlen + tmplen; -} \ No newline at end of file +} diff --git a/reginit.yy.cpp b/reginit.yy.cpp index 8422867..ff088f9 100644 --- a/reginit.yy.cpp +++ b/reginit.yy.cpp @@ -379,7 +379,7 @@ typedef unsigned char YY_CHAR; #define yytext_ptr yytext -#include +#include "FlexLexer.h" int yyFlexLexer::yywrap() { return 1; } int yyFlexLexer::yylex() diff --git a/reginitscanner.h b/reginitscanner.h index 4e78af9..23177be 100755 --- a/reginitscanner.h +++ b/reginitscanner.h @@ -29,7 +29,7 @@ #undef yyFlexLexer #define yyFlexLexer reginitFlexLexer -#include +#include "FlexLexer.h" #endif // Override the interface for yylex since we namespaced it