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;
|
FILE* file;
|
||||||
|
|
||||||
char buf[256];
|
size_t len = strlen(directory);
|
||||||
strcpy(&buf[0], directory);
|
char buf[1024];
|
||||||
|
strncpy(&buf[0], directory, sizeof(buf) - 1);
|
||||||
if (generate)
|
if (generate)
|
||||||
{
|
{
|
||||||
file = fopen(strcat(buf, tests[i].filename), "wb");
|
file = fopen(strncat(buf, tests[i].filename, sizeof(buf) - len - 1), "wb");
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
file = fopen(strcat(buf, tests[i].filename), "rb");
|
file = fopen(strncat(buf, tests[i].filename, sizeof(buf) - len - 1), "rb");
|
||||||
}
|
}
|
||||||
if (!file)
|
if (!file)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2326,7 +2326,7 @@ static void ZydisSetAVXInformation(ZydisDecoderContext* context,
|
||||||
(const ZydisInstructionDefinitionEVEX*)definition;
|
(const ZydisInstructionDefinitionEVEX*)definition;
|
||||||
|
|
||||||
// Vector length
|
// Vector length
|
||||||
uint8_t vectorLength = vectorLength = context->cache.LL;;
|
uint8_t vectorLength = context->cache.LL;
|
||||||
if (def->vectorLength)
|
if (def->vectorLength)
|
||||||
{
|
{
|
||||||
vectorLength = def->vectorLength - 1;
|
vectorLength = def->vectorLength - 1;
|
||||||
|
|
Loading…
Reference in New Issue