1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 07:43:50 +00:00

Addressed IOActive issues

This commit is contained in:
Bryan Roe
2020-07-15 01:24:56 -07:00
parent 70593e995b
commit 67fc6c54b1
14 changed files with 65 additions and 80 deletions

View File

@@ -143,7 +143,7 @@ duk_ret_t ILibDuktape_EncryptionStream_CreateEncryption(duk_context *ctx)
duk_size_t tmpLen;
char *tmp = (char*)duk_get_lstring(ctx, -1, &tmpLen);
duk_push_object(ctx); // [key][stream]
duk_push_fixed_buffer(ctx, ILibBase64DecodeLength((int)tmpLen));// [key][stream][buffer]
duk_push_fixed_buffer(ctx, ILibBase64DecodeLength(tmpLen));// [key][stream][buffer]
key = (char*)Duktape_GetBuffer(ctx, -1, NULL);
ILibBase64Decode((unsigned char*)tmp, (int)tmpLen, (unsigned char**)&key);
duk_put_prop_string(ctx, -2, "\xFF_key"); // [key][stream]
@@ -162,7 +162,7 @@ duk_ret_t ILibDuktape_EncryptionStream_CreateEncryption(duk_context *ctx)
{
duk_size_t tmpLen;
char *tmp = (char*)duk_get_lstring(ctx, -1, &tmpLen);
duk_push_fixed_buffer(ctx, ILibBase64DecodeLength((int)tmpLen)); // [stream][iv][buffer]
duk_push_fixed_buffer(ctx, ILibBase64DecodeLength(tmpLen)); // [stream][iv][buffer]
duk_swap_top(ctx, -2); // [stream][buffer][iv]
iv = (char*)Duktape_GetBuffer(ctx, -2, NULL);
ILibBase64Decode((unsigned char*)tmp, (int)tmpLen, (unsigned char**)&iv);