aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/crypto.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index eaf438e83..66a666e94 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -974,12 +974,11 @@ int
crypto_pk_check_fingerprint_syntax(const char *s)
{
int i;
- const unsigned char *cp = s;
for (i = 0; i < FINGERPRINT_LEN; ++i) {
if ((i%5) == 4) {
- if (!TOR_ISSPACE(cp[i])) return 0;
+ if (!TOR_ISSPACE(s[i])) return 0;
} else {
- if (!TOR_ISXDIGIT(cp[i])) return 0;
+ if (!TOR_ISXDIGIT(s[i])) return 0;
}
}
if (s[FINGERPRINT_LEN]) return 0;