diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-12-08 07:20:21 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-12-08 07:20:21 +0000 |
commit | fd4c624677cbf19ee01817195ada507752ae8f80 (patch) | |
tree | e45e15c1cc872bf3eef6c333c924da118daafff3 | |
parent | 524a8bdc70c751e5256b00444690a05f316c5c82 (diff) | |
download | tor-fd4c624677cbf19ee01817195ada507752ae8f80.tar tor-fd4c624677cbf19ee01817195ada507752ae8f80.tar.gz |
Belt *or* suspenders will be sufficient when casting things to unsigned char.
svn:r3122
-rw-r--r-- | src/common/crypto.c | 5 |
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; |