diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-05-02 21:11:28 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-05-02 21:11:28 +0000 |
commit | e1ee9ca90779bc2ceb3b28e5ccb66937f45a4bfd (patch) | |
tree | 40e2e9e1a01703992a2df4989dd306272e4219d9 /wiretap | |
parent | 736627bb971b65de3660637dfc8bab5ee3fac2a6 (diff) |
Put all the comments about the "don't check the CRC" flag together, and
expand the resulting comment a bit.
svn path=/trunk/; revision=42390
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/file_wrappers.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/wiretap/file_wrappers.c b/wiretap/file_wrappers.c index 9f3999a2c5..fa5aef43aa 100644 --- a/wiretap/file_wrappers.c +++ b/wiretap/file_wrappers.c @@ -541,15 +541,6 @@ zlib_read(FILE_T state, unsigned char *buf, unsigned int count) if (ret == Z_STREAM_END) { if (gz_next4(state, &crc) != -1 && gz_next4(state, &len) != -1) { - /* - * XXX - compressed Windows Sniffer don't - * all have the same CRC value; is it just - * random crap, or are they running the - * CRC on a different set of data than - * you're supposed to (e.g., not CRCing - * some of the data), or something such - * as that? - */ if (crc != strm->adler && !state->dont_check_crc) { state->err = WTAP_ERR_DECOMPRESS; state->err_info = "bad CRC"; @@ -869,8 +860,16 @@ file_open(const char *path) #ifdef HAVE_LIBZ /* * If this file's name ends in ".caz", it's probably a compressed - * Windows Sniffer file. The compression is gzip, but they don't - * bother filling in the CRC; we set a flag to ignore CRC errors. + * Windows Sniffer file. The compression is gzip, but if we + * process the CRC as specified by RFC 1952, the computed CRC + * doesn't match the stored CRC. + * + * Compressed Windows Sniffer files don't all have the same CRC + * value; is it just random crap, or are they running the CRC on + * a different set of data than you're supposed to (e.g., not + * CRCing some of the data), or something such as that? + * + * For now, we just set a flag to ignore CRC errors. */ suffixp = strrchr(path, '.'); if (suffixp != NULL) { |