arch/posix: use size_t for posix_fuzz_sz

That's the type of the original argument and we should use it internally as
well to prevent truncating the value.

Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
This commit is contained in:
Michael Zimmermann 2023-07-11 14:10:06 +02:00 committed by Fabio Baltieri
parent 6168f47ac3
commit 8de34fef19
2 changed files with 4 additions and 2 deletions

View file

@ -127,7 +127,8 @@ int main(int argc, char *argv[])
* "long enough" to handle the event and reach a quiescent state
* again)
*/
uint8_t *posix_fuzz_buf, posix_fuzz_sz;
uint8_t *posix_fuzz_buf;
size_t posix_fuzz_sz;
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t sz)
{

View file

@ -49,7 +49,8 @@ GEN_CHECK(5, 6)
GEN_CHECK(6, 0)
/* Fuzz input received from LLVM via "interrupt" */
extern uint8_t *posix_fuzz_buf, posix_fuzz_sz;
extern uint8_t *posix_fuzz_buf;
extern size_t posix_fuzz_sz;
K_SEM_DEFINE(fuzz_sem, 0, K_SEM_MAX_LIMIT);