Loading crypto/bn/bn_intern.c +7 −3 Original line number Diff line number Diff line Loading @@ -172,16 +172,20 @@ BN_ULONG *bn_get_words(const BIGNUM *a) return a->d; } void bn_set_static_words(BIGNUM *a, BN_ULONG *words, int size) void bn_set_static_words(BIGNUM *a, const BN_ULONG *words, int size) { a->d = words; /* * |const| qualifier omission is compensated by BN_FLG_STATIC_DATA * flag, which effectively means "read-only data". */ a->d = (BN_ULONG *)words; a->dmax = a->top = size; a->neg = 0; a->flags |= BN_FLG_STATIC_DATA; bn_correct_top(a); } int bn_set_words(BIGNUM *a, BN_ULONG *words, int num_words) int bn_set_words(BIGNUM *a, const BN_ULONG *words, int num_words) { if (bn_wexpand(a, num_words) == NULL) { BNerr(BN_F_BN_SET_WORDS, ERR_R_MALLOC_FAILURE); Loading crypto/include/internal/bn_int.h +2 −2 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ BN_ULONG *bn_get_words(const BIGNUM *a); * Set the internal data words in a to point to words which contains size * elements. The BN_FLG_STATIC_DATA flag is set */ void bn_set_static_words(BIGNUM *a, BN_ULONG *words, int size); void bn_set_static_words(BIGNUM *a, const BN_ULONG *words, int size); /* * Copy words into the BIGNUM |a|, reallocating space as necessary. Loading @@ -58,7 +58,7 @@ void bn_set_static_words(BIGNUM *a, BN_ULONG *words, int size); * |num_words| is int because bn_expand2 takes an int. This is an internal * function so we simply trust callers not to pass negative values. */ int bn_set_words(BIGNUM *a, BN_ULONG *words, int num_words); int bn_set_words(BIGNUM *a, const BN_ULONG *words, int num_words); /* * Some BIGNUM functions assume most significant limb to be non-zero, which Loading Loading
crypto/bn/bn_intern.c +7 −3 Original line number Diff line number Diff line Loading @@ -172,16 +172,20 @@ BN_ULONG *bn_get_words(const BIGNUM *a) return a->d; } void bn_set_static_words(BIGNUM *a, BN_ULONG *words, int size) void bn_set_static_words(BIGNUM *a, const BN_ULONG *words, int size) { a->d = words; /* * |const| qualifier omission is compensated by BN_FLG_STATIC_DATA * flag, which effectively means "read-only data". */ a->d = (BN_ULONG *)words; a->dmax = a->top = size; a->neg = 0; a->flags |= BN_FLG_STATIC_DATA; bn_correct_top(a); } int bn_set_words(BIGNUM *a, BN_ULONG *words, int num_words) int bn_set_words(BIGNUM *a, const BN_ULONG *words, int num_words) { if (bn_wexpand(a, num_words) == NULL) { BNerr(BN_F_BN_SET_WORDS, ERR_R_MALLOC_FAILURE); Loading
crypto/include/internal/bn_int.h +2 −2 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ BN_ULONG *bn_get_words(const BIGNUM *a); * Set the internal data words in a to point to words which contains size * elements. The BN_FLG_STATIC_DATA flag is set */ void bn_set_static_words(BIGNUM *a, BN_ULONG *words, int size); void bn_set_static_words(BIGNUM *a, const BN_ULONG *words, int size); /* * Copy words into the BIGNUM |a|, reallocating space as necessary. Loading @@ -58,7 +58,7 @@ void bn_set_static_words(BIGNUM *a, BN_ULONG *words, int size); * |num_words| is int because bn_expand2 takes an int. This is an internal * function so we simply trust callers not to pass negative values. */ int bn_set_words(BIGNUM *a, BN_ULONG *words, int num_words); int bn_set_words(BIGNUM *a, const BN_ULONG *words, int num_words); /* * Some BIGNUM functions assume most significant limb to be non-zero, which Loading