|
@@ -28,8 +28,9 @@ mock_crypto_pk_public_checksig__nocheck(const crypto_pk_t *env, char *to,
|
|
(void)fromlen;
|
|
(void)fromlen;
|
|
/* We could look at from[0..fromlen-1] ... */
|
|
/* We could look at from[0..fromlen-1] ... */
|
|
tor_assert(tolen >= crypto_pk_keysize(env));
|
|
tor_assert(tolen >= crypto_pk_keysize(env));
|
|
- memset(to, 0x01, 20);
|
|
|
|
- return 20;
|
|
|
|
|
|
+ size_t siglen = MIN(20, crypto_pk_keysize(env));
|
|
|
|
+ memset(to, 0x01, siglen);
|
|
|
|
+ return (int)siglen;
|
|
}
|
|
}
|
|
|
|
|
|
static int
|
|
static int
|