Remove alloca of potential big size

This commit is contained in:
Daniel Zaoui 2017-06-01 19:59:40 +03:00
parent 6e1eb7193d
commit 9e47089311
1 changed files with 2 additions and 1 deletions

View File

@ -307,7 +307,7 @@ _opcodes_registration_send(Eina_Debug_Session *session,
count++;
}
buf = alloca(size);
buf = malloc(size);
uint64_t info_64 = (uint64_t)info;
memcpy(buf, &info_64, sizeof(uint64_t));
@ -323,6 +323,7 @@ _opcodes_registration_send(Eina_Debug_Session *session,
}
eina_debug_session_send(session, 0, EINA_DEBUG_OPCODE_REGISTER, buf, size);
free(buf);
}
static void