[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Belt *or* suspenders will be sufficient when casting things...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] Belt *or* suspenders will be sufficient when casting things...
- From: nickm@seul.org (Nick Mathewson)
- Date: Wed, 8 Dec 2004 02:20:24 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Wed, 08 Dec 2004 02:20:44 -0500
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
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;