Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions FlexLexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <FlexLexer.h> 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 <FlexLexer.h>
// #include "FlexLexer.h"
//
// #undef yyFlexLexer
// #define yyFlexLexer zzFlexLexer
// #include <FlexLexer.h>
// #include "FlexLexer.h"
// ...

#ifndef __FLEX_LEXER_H
Expand Down Expand Up @@ -204,5 +204,3 @@ class yyFlexLexer : public FlexLexer {

#endif // yyFlexLexer || ! yyFlexLexerOnce


// 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
2 changes: 1 addition & 1 deletion bif.yy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ typedef unsigned char YY_CHAR;

#define yytext_ptr yytext

#include <FlexLexer.h>
#include "FlexLexer.h"

int yyFlexLexer::yywrap() { return 1; }
int yyFlexLexer::yylex()
Expand Down
2 changes: 1 addition & 1 deletion bifscanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#if ! defined(yyFlexLexerOnce)
#undef yyFlexLexer
#define yyFlexLexer bifFlexLexer
#include <FlexLexer.h>
#include "FlexLexer.h"
#endif

// Override the interface for yylex since we namespaced it
Expand Down
2 changes: 1 addition & 1 deletion cmdoptions.yy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ typedef unsigned char YY_CHAR;

#define yytext_ptr yytext

#include <FlexLexer.h>
#include "FlexLexer.h"

int yyFlexLexer::yywrap() { return 1; }
int yyFlexLexer::yylex()
Expand Down
2 changes: 1 addition & 1 deletion cmdoptionsscanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#undef yyFlexLexer
#define yyFlexLexer reginitFlexLexer
#include <FlexLexer.h>
#include "FlexLexer.h"
#endif

// Override the interface for yylex since we namespaced it
Expand Down
26 changes: 13 additions & 13 deletions elftools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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. */
Expand Down
4 changes: 2 additions & 2 deletions encryption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -642,4 +642,4 @@ void AesGcmEncryptionContext::AesGcm256Decrypt(unsigned char* gcm_pt, int& pt_le
EVP_CIPHER_CTX_free(ctx);

pt_len = outlen + tmplen;
}
}
2 changes: 1 addition & 1 deletion reginit.yy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ typedef unsigned char YY_CHAR;

#define yytext_ptr yytext

#include <FlexLexer.h>
#include "FlexLexer.h"

int yyFlexLexer::yywrap() { return 1; }
int yyFlexLexer::yylex()
Expand Down
2 changes: 1 addition & 1 deletion reginitscanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#undef yyFlexLexer
#define yyFlexLexer reginitFlexLexer
#include <FlexLexer.h>
#include "FlexLexer.h"
#endif

// Override the interface for yylex since we namespaced it
Expand Down