Skip to content

Commit bf099bd

Browse files
cheri: Increase size of argument buffer and align
CHERI pointers are capabilities and are larger than other platforms. They also require 16-byte alignment. Signed-off-by: William Beasley (The Capable Hub) <wbeasley@thegoodpenguin.co.uk>
1 parent 22fbaf5 commit bf099bd

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

wolfssl/internal.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5761,15 +5761,19 @@ typedef struct BuildMsgArgs {
57615761
#endif
57625762

57635763
#ifdef WOLFSSL_ASYNC_IO
5764-
#define MAX_ASYNC_ARGS 18
5764+
#define MAX_ASYNC_ARGS 24
57655765
typedef void (*FreeArgsCb)(struct WOLFSSL* ssl, void* pArgs);
57665766

57675767
struct WOLFSSL_ASYNC {
57685768
#if defined(WOLFSSL_ASYNC_CRYPT) && !defined(WOLFSSL_NO_TLS12)
57695769
BuildMsgArgs buildArgs; /* holder for current BuildMessage args */
57705770
#endif
57715771
FreeArgsCb freeArgs; /* function pointer to cleanup args */
5772+
#ifdef __CHERI__
5773+
max_align_t args[MAX_ASYNC_ARGS * sizeof(word32) / sizeof(max_align_t)]; /* holder for current args */
5774+
#else
57725775
word32 args[MAX_ASYNC_ARGS]; /* holder for current args */
5776+
#endif
57735777
};
57745778
#endif
57755779

0 commit comments

Comments
 (0)