improper access of sp_int_minimal using sp_int

related thread: https://bugzilla.redhat.com/show_bug.cgi?id=2047439

also found sp_uint8 that was not updated to sp_sign_t
This commit is contained in:
Sebastian Carpenter
2025-07-10 10:42:30 -06:00
parent 08ec3642f0
commit a00cfcb55f
2 changed files with 2 additions and 2 deletions

View File

@@ -5102,7 +5102,7 @@ static void _sp_init_size(sp_int* a, unsigned int size)
#endif #endif
_sp_zero((sp_int*)am); _sp_zero((sp_int*)am);
a->size = (sp_size_t)size; am->size = (sp_size_t)size;
} }
/* Initialize the multi-precision number to be zero with a given max size. /* Initialize the multi-precision number to be zero with a given max size.

View File

@@ -932,7 +932,7 @@ typedef struct sp_int_minimal {
sp_size_t size; sp_size_t size;
#ifdef WOLFSSL_SP_INT_NEGATIVE #ifdef WOLFSSL_SP_INT_NEGATIVE
/** Indicates whether number is 0/positive or negative. */ /** Indicates whether number is 0/positive or negative. */
sp_uint8 sign; sp_sign_t sign;
#endif #endif
#ifdef HAVE_WOLF_BIGINT #ifdef HAVE_WOLF_BIGINT
/** Unsigned binary (big endian) representation of number. */ /** Unsigned binary (big endian) representation of number. */