mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-25 13:43:31 +00:00
Fix psa_ff_server.c to calculate the amount of data from client correctly
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
This commit is contained in:
parent
b7e5f31e2a
commit
0a57a253cc
@ -8,6 +8,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/msg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -426,7 +427,7 @@ size_t psa_read(psa_handle_t msg_handle, uint32_t invec_idx,
|
||||
assert(idx >= 0);
|
||||
|
||||
len = msgrcv(connections[idx].client_to_server_q, &msg, sizeof(struct message_text), 0, 0);
|
||||
len = (len - sizeof(msg.message_text.qid));
|
||||
len = (len - offsetof(struct message_text, buf));
|
||||
|
||||
if (len < 0) {
|
||||
FATAL("Internal error: failed to dispatch read request to the client");
|
||||
|
Loading…
x
Reference in New Issue
Block a user