[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Make zlib detection happy on little-endian platforms; fix u...
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] Make zlib detection happy on little-endian platforms; fix u...
- From: nickm@xxxxxxxx (Nick Mathewson)
- Date: Thu, 20 Jan 2005 14:02:37 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Thu, 20 Jan 2005 14:02:56 -0500
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Update of /home/or/cvsroot/tor/src/common
In directory moria.mit.edu:/tmp/cvs-serv31445/src/common
Modified Files:
torgzip.c
Log Message:
Make zlib detection happy on little-endian platforms; fix unit tests.
Index: torgzip.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/torgzip.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- torgzip.c 19 Jan 2005 23:07:43 -0000 1.11
+++ torgzip.c 20 Jan 2005 19:02:35 -0000 1.12
@@ -235,7 +235,7 @@
if (in_len > 2 && !memcmp(in, "\x1f\x8b", 2)) {
return GZIP_METHOD;
} else if (in_len > 2 && (in[0] & 0x0f) == 8 &&
- (get_uint16(in) % 31) == 0) {
+ (ntohs(get_uint16(in)) % 31) == 0) {
return ZLIB_METHOD;
} else {
return 0;