[or-cvs] Belt *or* suspenders will be sufficient when casting things...
Nick Mathewson
nickm at seul.org
Wed Dec 8 07:20:24 UTC 2004
Update of /home/or/cvsroot/tor/src/common
In directory moria.mit.edu:/tmp/cvs-serv7053/src/common
Modified Files:
crypto.c
Log Message:
Belt *or* suspenders will be sufficient when casting things to unsigned char.
Index: crypto.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/crypto.c,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -d -r1.128 -r1.129
--- crypto.c 8 Dec 2004 00:40:01 -0000 1.128
+++ crypto.c 8 Dec 2004 07:20:21 -0000 1.129
@@ -974,12 +974,11 @@
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;
More information about the tor-commits
mailing list