mirror of https://github.com/x64dbg/zydis
Minor improvements to the performance-test tool
This commit is contained in:
parent
505224dc20
commit
10a9765585
|
@ -360,14 +360,15 @@ int main(int argc, char** argv)
|
|||
{
|
||||
FILE* file;
|
||||
|
||||
char buf[256];
|
||||
strcpy(&buf[0], directory);
|
||||
size_t len = strlen(directory);
|
||||
char buf[1024];
|
||||
strncpy(&buf[0], directory, sizeof(buf) - 1);
|
||||
if (generate)
|
||||
{
|
||||
file = fopen(strcat(buf, tests[i].filename), "wb");
|
||||
file = fopen(strncat(buf, tests[i].filename, sizeof(buf) - len - 1), "wb");
|
||||
} else
|
||||
{
|
||||
file = fopen(strcat(buf, tests[i].filename), "rb");
|
||||
file = fopen(strncat(buf, tests[i].filename, sizeof(buf) - len - 1), "rb");
|
||||
}
|
||||
if (!file)
|
||||
{
|
||||
|
|
|
@ -2326,7 +2326,7 @@ static void ZydisSetAVXInformation(ZydisDecoderContext* context,
|
|||
(const ZydisInstructionDefinitionEVEX*)definition;
|
||||
|
||||
// Vector length
|
||||
uint8_t vectorLength = vectorLength = context->cache.LL;;
|
||||
uint8_t vectorLength = context->cache.LL;
|
||||
if (def->vectorLength)
|
||||
{
|
||||
vectorLength = def->vectorLength - 1;
|
||||
|
|
Loading…
Reference in New Issue