diff options
author | 2021-07-09 13:35:36 +0300 | |
---|---|---|
committer | 2021-07-28 13:19:02 +0300 | |
commit | 404fcb1c102af07a6760a80fa994d20e9a4de7f7 (patch) | |
tree | 2327297df8b87204726d703da74fe49935cdd238 /lib/client.c | |
parent | d61cc219f6bd3c4ffc96239893a8ded9b5a83b30 (diff) |
lib: avoid static buffers, use alloca() more
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Diffstat (limited to 'lib/client.c')
-rw-r--r-- | lib/client.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/client.c b/lib/client.c index f1c4da1..d101223 100644 --- a/lib/client.c +++ b/lib/client.c @@ -6,6 +6,7 @@ * SPDX-License-Identifier: MIT */ +#include <alloca.h> #include "private.h" #include "protocol.h" #include "sender.h" @@ -50,7 +51,7 @@ bool icipc_client_send_request( return false; const size_t size = icipc_protocol_calculate_request_size(name, args); - uint8_t buffer[size]; + uint8_t *buffer = alloca(size); icipc_protocol_build_request(buffer, size, name, args); return icipc_sender_send(base, buffer, size, reply, data); } |